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


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 CLX Help

See also

CLX help is a reference for all the objects, components, global routines, types, and variables that make up the cross-platform component library (CLX). 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 some versions of the product.

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 cross-platform component library (CLX). 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 CLX. 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.


TWebActionItem
 CLX 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.


 CLX Reference

TWebActionItem properties

TWebActionItem	Alphabetically	Legend

In TWebActionItem

Default

DisplayName

Enabled

MethodType

Name

PathInfo

Producer

ProducerContent

Derived from TCollectionItem

Collection

ID

Index


 CLX Reference

TWebActionItem properties

TWebActionItem	By object	Legend

Collection

Default

DisplayName

Enabled

ID

Index

MethodType

Name

PathInfo

Producer

ProducerContent


TWebActionItem.Default
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TWebActionItem events

TWebActionItem	Alphabetically	Legend

In TWebActionItem

OnAction


 CLX Reference

TWebActionItem events

TWebActionItem	By object	Legend

OnAction


TWebActionItem.OnAction
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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::
 CLX 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
 CLX 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.


 CLX Reference

TWebActionItems properties

TWebActionItems	Alphabetically	Legend

In TWebActionItems

Items

WebDispatcher

Derived from TCollection

Count

ItemClass


 CLX Reference

TWebActionItems properties

TWebActionItems	By object	Legend

Count

ItemClass

Items

WebDispatcher


TWebActionItems.Items
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TApacheApplication properties

TApacheApplication	Alphabetically	Legend

Derived from TWebApplication

Title

Derived from TWebRequestHandler

ActiveCount

CacheConnections

InactiveCount

MaxConnections

WebModuleClass

WebModuleFactory

WebModuleFactoryCount

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TApacheApplication properties

TApacheApplication	By object	Legend

ActiveCount

CacheConnections

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

InactiveCount

MaxConnections

Name

Owner

Tag

Title

WebModuleClass

WebModuleFactory

WebModuleFactoryCount


 CLX 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

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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. TranslateURI is not relevant to CGI applications.


TApacheRequest.WriteClient
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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)


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TWebApplication
 CLX 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 .

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  unit to a CGI application or the CGIApp unit to an Apache application. The CGIApp 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.


 CLX Reference

TWebApplication properties

TWebApplication	Alphabetically	Legend

In TWebApplication

Title

Derived from TWebRequestHandler

ActiveCount

CacheConnections

InactiveCount

MaxConnections

WebModuleClass

WebModuleFactory

WebModuleFactoryCount

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TWebApplication properties

TWebApplication	By object	Legend

ActiveCount

CacheConnections

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

InactiveCount

MaxConnections

Name

Owner

Tag

Title

WebModuleClass

WebModuleFactory

WebModuleFactoryCount


TWebApplication.Title
 CLX 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 .so 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.


 CLX 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

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


 CLX 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

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
 CLX 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 or the ApacheApp unit is included in the uses list of the project.

Create allocates the helper objects used by TWebApplication.


TWebApplication.CreateForm
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TBasePageProducer
 CLX 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.


 CLX Reference

TBasePageProducer properties

TBasePageProducer	Alphabetically	Legend

In TBasePageProducer

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TBasePageProducer properties

TBasePageProducer	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

DispatcherComponent

Name

Owner

StripParamQuotes

Tag

WebModuleContext


TBasePageProducer.StripParamQuotes
 CLX 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
 CLX 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.


 CLX Reference

TBasePageProducer events

TBasePageProducer	Alphabetically	Legend

Derived from TBasePageProducer

OnHTMLTag


 CLX Reference

TBasePageProducer events

TBasePageProducer	By object	Legend

OnHTMLTag


TBasePageProducer.OnHTMLTag
 CLX 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.


 CLX Reference

TBasePageProducer methods

TBasePageProducer	Alphabetically	Legend

In TBasePageProducer

Content

ContentFromStream

ContentFromString

Create

Derived from TComponent

BeforeDestruction

Destroy

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TBasePageProducer.Content
 CLX 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.ContentFromStream
 CLX 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.


TBasePageProducer.ContentFromString
 CLX 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.


TBasePageProducer.Create
 CLX 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


TBaseSocket
 CLX 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.


 CLX Reference

TBaseSocket properties

TBaseSocket	Alphabetically	Legend

In TBaseSocket

Active

BlockMode

BytesReceived

BytesSent

Domain

Handle

Protocol

SockType

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TBaseSocket properties

TBaseSocket	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Domain

Handle

Name

Owner

Protocol

SockType

Tag


TBaseSocket.Active
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TBaseSocket.Domain

TBaseSocket	See also

Sets or returns the protocol family used by the socket.

type TSocketDomain = (pfUnspec, pfLocal, pfUnix, pfFile, pfInet, pfAx25, pfIpx, pfAppleTalk, pfNetRom, pfBridge, pfAtmPvc, pfX25, pfInet6, pfRose, pfDecNet, pfNetbeui, pfSecurity, pfKey, pfNetLink, pfRoute, pfPacket, pfAsh, pfEcoNet, pfAtmSvc, pfSna, pfIrda, 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

pfAsh	Ash

pfAppleTalk	AppleTalk DDP

pfAtmPvc	ATM PVCs

pfAtmSvc	ATM SVCs

pfAx25	Ax.25 (Amateur Packet-Radio Link-Layer Protocol)

pfBridge	Multi-protocol bridge

pfDecNet	Reserved for DECnet project

pfEcoNet	Acorn EcoNet

pfFile	Local to host

pfInet	IP protocol family

pfInet6	IP version 6

pfIpx	Novell Interner Protocol

pfIrda	IRDA sockets

pfKey	Key management API

pfLocal	Local to host (pipes and file-domain)

pfMax	Maximum protocol family number

pfNetBeui	Reserved for 802.2LLC project

pfNetLink	NetLINK

pfNetRom	Amateur radio NetROM

pfPacket	Packet family

pfRose	Amateur radio X.25 PLP

pfRoute	Alias to emulate BSD 4.4

pfSecurity	Security callback pseudo AF

pfSna	Linux SNA project

pfUnix	Local to host (old BSD name for local)

pfUnspec	Unspecified

pfX25	Reserved for X.25 project


TBaseSocket.Handle
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TBaseSocket events

TBaseSocket	By object	Legend

In TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 CLX Reference

TBaseSocket events

TBaseSocket	By object	Legend

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


TBaseSocket.OnCreateHandle
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TBaseSocket.OnSend
 CLX 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).


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TBaseSocket.MapDomain

TBaseSocket	See also

Maps the domain.

type TSocketDomain = (pfUnspec, pfLocal, pfUnix, pfFile, pfInet, pfAx25, pfIpx, pfAppleTalk, pfNetRom, pfBridge, pfAtmPvc, pfX25, pfInet6, pfRose, pfDecNet, pfNetbeui, pfSecurity, pfKey, pfNetLink, pfRoute, pfPacket, pfAsh, pfEcoNet, pfAtmSvc, pfSna, pfIrda, 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TCGIApplication
 CLX 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.


 CLX Reference

TCGIApplication properties

TCGIApplication	Alphabetically	Legend

Derived from TWebApplication

Title

Derived from TWebRequestHandler

ActiveCount

CacheConnections

InactiveCount

MaxConnections

WebModuleClass

WebModuleFactory

WebModuleFactoryCount

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCGIApplication properties

TCGIApplication	By object	Legend

ActiveCount

CacheConnections

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

InactiveCount

MaxConnections

Name

Owner

Tag

Title

WebModuleClass

WebModuleFactory

WebModuleFactoryCount


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TCookieCollection
 CLX 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.


 CLX Reference

TCookieCollection properties

TCookieCollection	Alphabetically	Legend

In TCookieCollection

Items

WebResponse

Derived from TCollection

Count

ItemClass


 CLX Reference

TCookieCollection properties

TCookieCollection	By object	Legend

Count

ItemClass

Items

WebResponse


TCookieCollection.Items
 CLX 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
 CLX 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 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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


TCookie
 CLX 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.


 CLX Reference

TCookie properties

TCookie	Alphabetically	Legend

In TCookie

Domain

Expires

HeaderValue

Name

Path

Secure

Value

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 CLX Reference

TCookie properties

TCookie	By object	Legend

Collection

DisplayName

Domain

Expires

HeaderValue

ID

Index

Name

Path

Secure

Value


TCookie.Domain
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TCustomPageProducer properties

TCustomPageProducer	Alphabetically	Legend

In TCustomPageProducer

HTMLDoc

HTMLFile

Derived from TBasePageProducer

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCustomPageProducer properties

TCustomPageProducer	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

DispatcherComponent

HTMLDoc

HTMLFile

Name

Owner

StripParamQuotes

Tag

WebModuleContext


TCustomPageProducer.HTMLDoc
 CLX 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
 CLX 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.


 CLX Reference

TCustomPageProducer methods

TCustomPageProducer	Alphabetically	Legend

In 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

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomPageProducer.Create
 CLX 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
 CLX 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


TClientSocketThread
 CLX 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.


 CLX Reference

TClientSocketThread properties

TClientSocketThread	Alphabetically	Legend

In TClientSocketThread

ClientSocket

ServerSocketThread

Derived from TThread

FatalException

FreeOnTerminate

Handle

Policy

Priority

Suspended

ThreadID


 CLX Reference

TClientSocketThread properties

TClientSocketThread	By object	Legend

ClientSocket

FatalException

FreeOnTerminate

Handle

Policy

Priority

ServerSocketThread

Suspended

ThreadID


TClientSocketThread.ClientSocket
 CLX 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
 CLX 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.


 CLX Reference

TClientSocketThread events

TClientSocketThread	Alphabetically	Legend

Derived from TThread

OnTerminate


 CLX Reference

TClientSocketThread events

TClientSocketThread	By object	Legend

OnTerminate


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TCustomIpClient
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCustomIpClient properties

TCustomIpClient	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DesignInfo

Domain

Handle

LocalHost

LocalPort

Name

Owner

Protocol

RemoteHost

RemotePort

SockType

Tag


TCustomIpClient.Connected
 CLX 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.


 CLX Reference

TCustomIpClient events

TCustomIpClient	Alphabetically	Legend

In TCustomIpClient

OnConnect

OnDisconnect

Derived from TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 CLX Reference

TCustomIpClient events

TCustomIpClient	By object	Legend

OnConnect

OnCreateHandle

OnDestroyHandle

OnDisconnect

OnError

OnReceive

OnSend


TCustomIpClient.OnConnect
 CLX 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
 CLX 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.


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TCustomTcpServer
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCustomTcpServer properties

TCustomTcpServer	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Domain

Handle

Listening

LocalHost

LocalPort

Name

Owner

Protocol

RemoteHost

RemotePort

ServerSocketThread

SockType

Tag


TCustomTcpServer.BlockMode
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TCustomTcpServer events

TCustomTcpServer	Alphabetically	Legend

In TCustomTcpServer

OnAccept

OnGetThread

OnListening

Derived from TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 CLX Reference

TCustomTcpServer events

TCustomTcpServer	By object	Legend

OnAccept

OnCreateHandle

OnDestroyHandle

OnError

OnGetThread

OnListening

OnReceive

OnSend


TCustomTcpServer.OnAccept
 CLX 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
 CLX 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
 CLX 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.


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TCustomWebDispatcher
 CLX 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.


 CLX Reference

TCustomWebDispatcher properties

TCustomWebDispatcher	Alphabetically	Legend

In TCustomWebDispatcher

Action

Actions

AfterDispatch

BeforeDispatch

Request

Response

Derived from TDataModule

DesignOffset

DesignSize

OldCreateOrder

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCustomWebDispatcher properties

TCustomWebDispatcher	By object	Legend

Action

Actions

AfterDispatch

BeforeDispatch

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DesignOffset

DesignSize

Name

OldCreateOrder

Owner

Request

Response

Tag


TCustomWebDispatcher.Action
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TCustomWebDispatcher events

TCustomWebDispatcher	Alphabetically	Legend

In TCustomWebDispatcher

OnException

Derived from TDataModule

OnCreate

OnDestroy


 CLX Reference

TCustomWebDispatcher events

TCustomWebDispatcher	By object	Legend

OnCreate

OnDestroy

OnException


TCustomWebDispatcher.OnException
 CLX 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.


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleException

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Notification

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomWebDispatcher.ActionByName
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TCustomDataSetPageProducer properties

TCustomDataSetPageProducer	Alphabetically	Legend

In TCustomDataSetPageProducer

DataSet

Derived from TCustomPageProducer

HTMLDoc

HTMLFile

Derived from TBasePageProducer

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCustomDataSetPageProducer properties

TCustomDataSetPageProducer	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSet

DesignInfo

Dispatcher

DispatcherComponent

HTMLDoc

HTMLFile

Name

Owner

StripParamQuotes

Tag

WebModuleContext


TCustomDataSetPageProducer.DataSet
 CLX 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.


 CLX Reference

TCustomDataSetPageProducer events

TCustomDataSetPageProducer	Alphabetically	Legend

Derived from TBasePageProducer

OnHTMLTag


 CLX Reference

TCustomDataSetPageProducer events

TCustomDataSetPageProducer	By object	Legend

OnHTMLTag


 CLX 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

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomDataSetPageProducer.Content
 CLX 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
 CLX 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.


 CLX Reference

TCustomContentProducer properties

TCustomContentProducer	Alphabetically	Legend

In TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCustomContentProducer properties

TCustomContentProducer	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

DispatcherComponent

Name

Owner

Tag


TCustomContentProducer.Dispatcher
 CLX 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
 CLX 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.


 CLX Reference

TCustomContentProducer methods

TCustomContentProducer	Alphabetically	Legend

In TCustomContentProducer

Content

ContentFromStream

ContentFromString

Notification

Derived from TComponent

BeforeDestruction

Create

Destroy

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Notification

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomContentProducer.Content
 CLX 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
 CLX 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
 CLX 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
 CLX 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


THTTPDataLink
 CLX 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.


 CLX 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


 CLX Reference

THTTPDataLink properties

THTTPDataLink	By object	Legend

Active

ActiveRecord

BOF

BufferCount

DataSet

DataSource

DataSourceFixed

DefaultFields

Editing

EOF

FieldCount

Fields

ReadOnly

RecordCount

SparseMap


THTTPDataLink.DefaultFields
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TWebDispatcher
 CLX 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.


 CLX Reference

TWebDispatcher properties

TWebDispatcher	Alphabetically	Legend

Derived from TCustomWebDispatcher

Action

Actions

AfterDispatch

BeforeDispatch

Request

Response

Derived from TDataModule

DesignOffset

DesignSize

OldCreateOrder

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TWebDispatcher properties

TWebDispatcher	By object	Legend

Action

Actions

AfterDispatch

BeforeDispatch

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DesignOffset

DesignSize

Name

OldCreateOrder

Owner

Request

Response

Tag


 CLX Reference

TWebDispatcher events

TWebDispatcher	Alphabetically	Legend

Derived from TCustomWebDispatcher

OnException

Derived from TDataModule

OnCreate

OnDestroy


 CLX Reference

TWebDispatcher events

TWebDispatcher	By object	Legend

OnCreate

OnDestroy

OnException


 CLX 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

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


 CLX 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

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


TDataSetPageProducer
 CLX 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.


 CLX Reference

TDataSetPageProducer properties

TDataSetPageProducer	Alphabetically	Legend

Derived from TCustomDataSetPageProducer

DataSet

Derived from TCustomPageProducer

HTMLDoc

HTMLFile

Derived from TBasePageProducer

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TDataSetPageProducer properties

TDataSetPageProducer	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSet

DesignInfo

Dispatcher

DispatcherComponent

HTMLDoc

HTMLFile

Name

Owner

StripParamQuotes

Tag

WebModuleContext


 CLX Reference

TDataSetPageProducer events

TDataSetPageProducer	Alphabetically	Legend

Derived from TBasePageProducer

OnHTMLTag


 CLX Reference

TDataSetPageProducer events

TDataSetPageProducer	By object	Legend

OnHTMLTag


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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


TDataSetTableProducer
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TDataSetTableProducer properties

TDataSetTableProducer	By object	Legend

Caption

CaptionAlignment

Columns

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSet

DesignInfo

Dispatcher

DispatcherComponent

Editor

Footer

Header

MaxRows

Name

Owner

RowAttributes

TableAttributes

Tag


 CLX Reference

TDataSetTableProducer events

TDataSetTableProducer	Alphabetically	Legend

Derived from TDSTableProducer

OnCreateContent

OnFormatCell

OnGetTableCaption


 CLX Reference

TDataSetTableProducer events

TDataSetTableProducer	By object	Legend

OnCreateContent

OnFormatCell

OnGetTableCaption


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TDataSetTableProducer.Content
 CLX 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
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TDSTableProducer properties

TDSTableProducer	By object	Legend

Caption

CaptionAlignment

Columns

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataLink

DataSet

DataSource

DesignInfo

Dispatcher

DispatcherComponent

Editor

Footer

Header

InternalDataSource

MaxRows

Name

Owner

RowAttributes

TableAttributes

Tag


TDSTableProducer.Caption
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TDSTableProducer events

TDSTableProducer	Alphabetically	Legend

In TDSTableProducer

OnCreateContent

OnFormatCell

OnGetTableCaption


 CLX Reference

TDSTableProducer events

TDSTableProducer	By object	Legend

OnCreateContent

OnFormatCell

OnGetTableCaption


TDSTableProducer.OnCreateContent
 CLX 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
 CLX 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
 CLX 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.


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TDSTableProducerEditor properties

TDSTableProducerEditor	Alphabetically	Legend

In TDSTableProducerEditor

DataSource

DSTableProducer


 CLX Reference

TDSTableProducerEditor properties

TDSTableProducerEditor	By object	Legend

DataSource

DSTableProducer


TDSTableProducerEditor.DataSource
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TIpSocket
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TIpSocket properties

TIpSocket	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Domain

Handle

LocalHost

LocalPort

Name

Owner

Protocol

RemoteHost

RemotePort

SockType

Tag


TIpSocket.LocalHost
 CLX 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 Linux machines, if a host name is not available, create one for the local IP address by entering the name into the /etc/hosts file. See your Linux documentation  for more information on the /etc/hosts file.


TIpSocket.LocalPort
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TIpSocket events

TIpSocket	By object	Legend

Derived from TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 CLX Reference

TIpSocket events

TIpSocket	By object	Legend

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 /etc/services file based on the service name and protocol number.

For more information, refer to the Services(5) Linux manual page.


TIpSocket.LookupProtocol
 CLX 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 /etc/protocols file based on the protocol name.

For more information, refer to the Protocols(5) Linux manual page.


TIpSocket.ReceiveFrom
 CLX 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
 CLX 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


TPageProducer
 CLX 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.


 CLX Reference

TPageProducer properties

TPageProducer	Alphabetically	Legend

Derived from TCustomPageProducer

HTMLDoc

HTMLFile

Derived from TBasePageProducer

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TPageProducer properties

TPageProducer	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

DispatcherComponent

HTMLDoc

HTMLFile

Name

Owner

StripParamQuotes

Tag

WebModuleContext


 CLX Reference

TPageProducer events

TPageProducer	Alphabetically	Legend

Derived from TBasePageProducer

OnHTMLTag


 CLX Reference

TPageProducer events

TPageProducer	By object	Legend

OnHTMLTag


 CLX 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


 CLX 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


TRawSocket
 CLX Reference

TRawSocket

Hierarchy	Properties	Methods 	Events	See also

TRawSocket encapsulates a raw socket

Unit

Sockets

Description

TRawSocket encapsulates a raw socket.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TRawSocket properties

TRawSocket	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Domain

Handle

LocalHost

LocalPort

Name

Owner

Protocol

RemoteHost

RemotePort

SockType

Tag


 CLX Reference

TRawSocket events

TRawSocket	Alphabetically	Legend

Derived from TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 CLX Reference

TRawSocket events

TRawSocket	By object	Legend

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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


HtmlTable function
 CLX 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.


DayOfWeekStr function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


SetErrorProc function
 CLX Reference

SetErrorProc function

See also

Replaces the exception handler for error messages that are received from a Windows socket connection.

Unit

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.


Application variable (for Web server applications)
 CLX 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  server application, Application is initialized to a TCGIApplication object. If the project represents an Apache server application, Application is initialized to a TApacheApplication object. Which type of TWebApplication object gets created depends on whether the project includes the ApacheApp unit or the CGIApp unit.


TSQLQueryTableProducer
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TSQLQueryTableProducer properties

TSQLQueryTableProducer	By object	Legend

Caption

CaptionAlignment

Columns

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSet

DesignInfo

Dispatcher

DispatcherComponent

Editor

Footer

Header

MaxRows

Name

Owner

Query

RowAttributes

TableAttributes

Tag


TSQLQueryTableProducer.Query
 CLX 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.


 CLX Reference

TSQLQueryTableProducer events

TSQLQueryTableProducer	Alphabetically	Legend

Derived from TDSTableProducer

OnCreateContent

OnFormatCell

OnGetTableCaption


 CLX Reference

TSQLQueryTableProducer events

TSQLQueryTableProducer	By object	Legend

OnCreateContent

OnFormatCell

OnGetTableCaption


 CLX 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

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSQLQueryTableProducer.Content
 CLX Reference

TSQLQueryTableProducer.Content

TSQLQueryTableProducer	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 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


TServerSocketThread
 CLX 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.


 CLX Reference

TServerSocketThread properties

TServerSocketThread	Alphabetically	Legend

In TServerSocketThread

ServerSocket

ThreadCacheSize

ThreadPool

Derived from TThread

FatalException

FreeOnTerminate

Handle

Policy

Priority

Suspended

ThreadID


 CLX Reference

TServerSocketThread properties

TServerSocketThread	By object	Legend

FatalException

FreeOnTerminate

Handle

Policy

Priority

ServerSocket

Suspended

ThreadCacheSize

ThreadID

ThreadPool


TServerSocketThread.ServerSocket
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TServerSocketThread events

TServerSocketThread	Alphabetically	Legend

In TServerSocketThread

OnGetThread

Derived from TThread

OnTerminate


 CLX Reference

TServerSocketThread events

TServerSocketThread	By object	Legend

OnGetThread

OnTerminate


TServerSocketThread.OnGetThread
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


THTMLTableAttributes
 CLX 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.


 CLX Reference

THTMLTableAttributes properties

THTMLTableAttributes	Alphabetically	Legend

In THTMLTableAttributes

Align

BgColor

Border

CellPadding

CellSpacing

Width

Derived from THTMLTagAttributes

Custom

Producer


 CLX Reference

THTMLTableAttributes properties

THTMLTableAttributes	By object	Legend

Align

BgColor

Border

CellPadding

CellSpacing

Custom

Producer

Width


THTMLTableAttributes.Align
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

THTMLTableAttributes events

THTMLTableAttributes	Alphabetically	Legend

Derived from THTMLTagAttributes

OnChange


 CLX Reference

THTMLTableAttributes events

THTMLTableAttributes	By object	Legend

OnChange


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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


THTMLTableCellAttributes
 CLX 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.


 CLX Reference

THTMLTableCellAttributes properties

THTMLTableCellAttributes	Alphabetically	Legend

Derived from THTMLTableElementAttributes

Align

BgColor

VAlign

Derived from THTMLTagAttributes

Custom

Producer


 CLX Reference

THTMLTableCellAttributes properties

THTMLTableCellAttributes	By object	Legend

Align

BgColor

Custom

Producer

VAlign


 CLX Reference

THTMLTableCellAttributes events

THTMLTableCellAttributes	Alphabetically	Legend

Derived from THTMLTagAttributes

OnChange


 CLX Reference

THTMLTableCellAttributes events

THTMLTableCellAttributes	By object	Legend

OnChange


 CLX 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


 CLX 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


THTMLTableElementAttributes
 CLX 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.


 CLX Reference

THTMLTableElementAttributes properties

THTMLTableElementAttributes	Alphabetically	Legend

In THTMLTableElementAttributes

Align

BgColor

VAlign

Derived from THTMLTagAttributes

Custom

Producer


 CLX Reference

THTMLTableElementAttributes properties

THTMLTableElementAttributes	By object	Legend

Align

BgColor

Custom

Producer

VAlign


THTMLTableElementAttributes.Align
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

THTMLTableElementAttributes events

THTMLTableElementAttributes	Alphabetically	Legend

Derived from THTMLTagAttributes

OnChange


 CLX Reference

THTMLTableElementAttributes events

THTMLTableElementAttributes	By object	Legend

OnChange


 CLX 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


 CLX 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
 CLX 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
 CLX 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


THTMLTableHeaderAttributes
 CLX 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.


 CLX Reference

THTMLTableHeaderAttributes properties

THTMLTableHeaderAttributes	Alphabetically	Legend

In THTMLTableHeaderAttributes

Caption

Derived from THTMLTableElementAttributes

Align

BgColor

VAlign

Derived from THTMLTagAttributes

Custom

Producer


 CLX Reference

THTMLTableHeaderAttributes properties

THTMLTableHeaderAttributes	By object	Legend

Align

BgColor

Caption

Custom

Producer

VAlign


THTMLTableHeaderAttributes.Caption
 CLX 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.


 CLX Reference

THTMLTableHeaderAttributes events

THTMLTableHeaderAttributes	Alphabetically	Legend

Derived from THTMLTagAttributes

OnChange


 CLX Reference

THTMLTableHeaderAttributes events

THTMLTableHeaderAttributes	By object	Legend

OnChange


 CLX 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


 CLX 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
 CLX 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


THTMLTableRowAttributes
 CLX 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.


 CLX Reference

THTMLTableRowAttributes properties

THTMLTableRowAttributes	Alphabetically	Legend

Derived from THTMLTableElementAttributes

Align

BgColor

VAlign

Derived from THTMLTagAttributes

Custom

Producer


 CLX Reference

THTMLTableRowAttributes properties

THTMLTableRowAttributes	By object	Legend

Align

BgColor

Custom

Producer

VAlign


 CLX Reference

THTMLTableRowAttributes events

THTMLTableRowAttributes	Alphabetically	Legend

Derived from THTMLTagAttributes

OnChange


 CLX Reference

THTMLTableRowAttributes events

THTMLTableRowAttributes	By object	Legend

OnChange


 CLX 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


 CLX 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


THTMLTableColumn
 CLX 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.


 CLX Reference

THTMLTableColumn properties

THTMLTableColumn	Alphabetically	Legend

In THTMLTableColumn

Align

BgColor

Custom

DSTableProducer

Field

FieldName

Title

VAlign

Derived from TCollectionItem

Collection

ID

Index


 CLX Reference

THTMLTableColumn properties

THTMLTableColumn	By object	Legend

Align

BgColor

Collection

Custom

DSTableProducer

Field

FieldName

ID

Index

Title

VAlign


THTMLTableColumn.Align
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


THTMLTableColumns
 CLX 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.


 CLX Reference

THTMLTableColumns properties

THTMLTableColumns	Alphabetically	Legend

In THTMLTableColumns

DSTableProducer

Items

State

Derived from TCollection

Count

ItemClass


 CLX Reference

THTMLTableColumns properties

THTMLTableColumns	By object	Legend

Count

DSTableProducer

ItemClass

Items

State


THTMLTableColumns.DSTableProducer
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

THTMLTagAttributes properties

THTMLTagAttributes	Alphabetically	Legend

In THTMLTagAttributes

Custom

Producer


 CLX Reference

THTMLTagAttributes properties

THTMLTagAttributes	By object	Legend

Custom

Producer


THTMLTagAttributes.Custom
 CLX 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
 CLX 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.


 CLX Reference

THTMLTagAttributes events

THTMLTagAttributes	Alphabetically	Legend

In THTMLTagAttributes

OnChange


 CLX Reference

THTMLTagAttributes events

THTMLTagAttributes	By object	Legend

OnChange


THTMLTagAttributes.OnChange
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TTcpClient properties

TTcpClient	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DesignInfo

Domain

Handle

LocalHost

LocalPort

Name

Owner

Protocol

RemoteHost

RemotePort

SockType

Tag


 CLX Reference

TTcpClient events

TTcpClient	By object	Legend

Derived from TCustomIpClient

OnConnect

OnDisconnect

Derived from TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 CLX Reference

TTcpClient events

TTcpClient	By object	Legend

OnConnect

OnCreateHandle

OnDestroyHandle

OnDisconnect

OnError

OnReceive

OnSend


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TTcpServer properties

TTcpServer	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Domain

Handle

Listening

LocalHost

LocalPort

Name

Owner

Protocol

RemoteHost

RemotePort

ServerSocketThread

SockType

Tag


 CLX Reference

TTcpServer events

TTcpServer	By object	Legend

Derived from TCustomTcpServer

OnAccept

OnGetThread

OnListening

Derived from TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 CLX Reference

TTcpServer events

TTcpServer	By object	Legend

OnAccept

OnCreateHandle

OnDestroyHandle

OnError

OnGetThread

OnListening

OnReceive

OnSend


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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


TUdpSocket
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TUdpSocket properties

TUdpSocket	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DesignInfo

Domain

Handle

LocalHost

LocalPort

Name

Owner

Protocol

RemoteHost

RemotePort

SockType

Tag


 CLX Reference

TUdpSocket events

TUdpSocket	Alphabetically	Legend

Derived from TCustomIpClient

OnConnect

OnDisconnect

Derived from TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 CLX Reference

TUdpSocket events

TUdpSocket	By object	Legend

OnConnect

OnCreateHandle

OnDestroyHandle

OnDisconnect

OnError

OnReceive

OnSend


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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


EWebBrokerException
 CLX 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.


 CLX Reference

EWebBrokerException properties

EWebBrokerException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EWebBrokerException properties

EWebBrokerException	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


TWebModule
 CLX 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.


 CLX Reference

TWebModule properties

TWebModule	Alphabetically	Legend

Derived from TCustomWebDispatcher

Action

Actions

AfterDispatch

BeforeDispatch

Request

Response

Derived from TDataModule

DesignOffset

DesignSize

OldCreateOrder

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TWebModule properties

TWebModule	By object	Legend

Action

Actions

AfterDispatch

BeforeDispatch

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DesignOffset

DesignSize

Name

OldCreateOrder

Owner

Request

Response

Tag


 CLX Reference

TWebModule events

TWebModule	Alphabetically	Legend

Derived from TCustomWebDispatcher

OnException

Derived from TDataModule

OnCreate

OnDestroy


 CLX Reference

TWebModule events

TWebModule	By object	Legend

OnCreate

OnDestroy

OnException


 CLX 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

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TWebModule.Create
 CLX 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


TAggregates
 CLX 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.


 CLX Reference

TAggregates properties

TAggregates	Alphabetically	Legend

In TAggregates

Items

Derived from TCollection

Count

ItemClass


 CLX Reference

TAggregates properties

TAggregates	By object	Legend

Count

ItemClass

Items


TAggregates.Items
 CLX 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];


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TAggregatedObject properties

TAggregatedObject	Alphabetically	Legend

In TAggregatedObject

Controller


 CLX Reference

TAggregatedObject properties

TAggregatedObject	By object	Legend

Controller


TAggregatedObject.Controller
 CLX 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.


 CLX 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


 CLX 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
 CLX 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


TAutoIncField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TAutoIncField properties

TAutoIncField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


 CLX Reference

TAutoIncField events

TAutoIncField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TAutoIncField events

TAutoIncField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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


TBookmarkList
 CLX Reference

TBookmarkList

Hierarchy	Properties	Methods	See also

TBookmarkList is a collection of bookmarks that identify a set of records in a dataset.

Unit

QDBGrids

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.


 CLX Reference

TBookmarkList properties

TBookmarkList	Alphabetically	Legend

In TBookmarkList

Count

CurrentRowSelected

Items


 CLX Reference

TBookmarkList properties

TBookmarkList	By object	Legend

Count

CurrentRowSelected

Items


TBookmarkList.Count
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TBlobField properties

TBlobField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

BlobSize

BlobType

Calculated

CanModify

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

Visible


TBlobField.AsString
 CLX 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
 CLX 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
 CLX 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.


TBlobField.BlobType
 CLX 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
 CLX 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
 CLX 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.


TBlobField.Modified
 CLX 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.

BLOB fields use the Modified property to trigger data events and to indicate when the dataset may need to clean up any buffers used to store BLOB data.


TBlobField.Transliterate
 CLX 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 uses a different character set than UTF-8 (on Linux) or ANSI (on Windows) and the BLOB field contains text.

When Transliterate is True BLOB fields call the dataset’s Translate method to translate UTF-8 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 UTF-8 (Linux) or ANSI (Windows) character 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
 CLX 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.


 CLX Reference

TBlobField events

TBlobField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TBlobField events

TBlobField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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
 CLX 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.


TBlobField.Create
 CLX 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
 CLX 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
 CLX 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.


TBlobField.LoadFromStream
 CLX 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
 CLX 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.


TBlobField.SaveToStream
 CLX 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
 CLX 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


TBooleanField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TBooleanField properties

TBooleanField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TBooleanField.AsBoolean
 CLX 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.


TBooleanField.AsString
 CLX 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
 CLX 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.


TBooleanField.DataSize
 CLX 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
 CLX 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:

ClientDataSet1LogicalField.DisplayValues := 'T;F';

Similarly, to set the values of True and False to the strings Yes and No, set DisplayValues to

ClientDataSet1LogicalField.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

ClientDataSet1LogicalField.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
 CLX 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.


 CLX Reference

TBooleanField events

TBooleanField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TBooleanField events

TBooleanField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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


TBytesField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TBytesField properties

TBytesField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TBytesField.DataSize
 CLX 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.


 CLX Reference

TBytesField events

TBytesField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TBytesField events

TBytesField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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


TDataSetAction
 CLX Reference

TDataSetAction

Hierarchy	Properties	Methods	Events	Using TDataSetAction	See also

TDataSetAction is the base class for action objects that act on dataset components.

Unit

QDBActns

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.


 CLX Reference

TDataSetAction properties

TDataSetAction	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDataSetAction properties

TDataSetAction	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


TDataSetAction.DataSource
 CLX 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.


 CLX Reference

TDataSetAction events

TDataSetAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TDataSetAction events

TDataSetAction	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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


TDataSetDesigner
 CLX 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.


 CLX Reference

TDataSetDesigner properties

TDataSetDesigner	Alphabetically 	Legend

In TDataSetDesigner

DataSet


 CLX Reference

TDataSetDesigner properties

TDataSetDesigner	By object 	Legend

DataSet


TDataSetDesigner.DataSet
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TDataSetPrior
 CLX Reference

TDataSetPrior

Hierarchy	Properties	Methods	Events	Using TDataSetPrior	See also

TDataSetPrior moves a target dataset to the previous record.

Unit

QDBActns

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.


 CLX Reference

TDataSetPrior properties

TDataSetPrior	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDataSetPrior properties

TDataSetPrior	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TDataSetPrior events

TDataSetPrior	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TDataSetPrior events

TDataSetPrior	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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


EDatabaseError
 CLX 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.


 CLX Reference

EDatabaseError properties

EDatabaseError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EDatabaseError properties

EDatabaseError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX 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.


 CLX Reference

EDBClient properties

EDBClient	Alphabetically	Legend

In EDBClient

ErrorCode

Derived from Exception

HelpContext

Message


 CLX Reference

EDBClient properties

EDBClient	By object	Legend

ErrorCode

HelpContext

Message


EDBClient.ErrorCode
 CLX Reference

EDBClient.ErrorCode

EDBClient	See also

The error code returned by the BDE.

property ErrorCode: DBResult;

Description

ErrorCode is the error code returned by dbExpress or other underlying database access mechanism.


 CLX 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


 CLX 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
 CLX 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
 CLX Reference

EDBEditError

Hierarchy	Properties	Methods	See also

EDBEditError is the exception class for data that are incompatible with a specified mask.

Unit

QMask

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.


 CLX Reference

EDBEditError properties

EDBEditError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EDBEditError properties

EDBEditError	By object	Legend

Message

HelpContext


 CLX 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


 CLX 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


TEvent
 CLX Reference

TEvent

Hierarchy	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.


 CLX Reference

TEvent methods

TEvent	By Object	Legend

In TEvent

Create

ResetEvent

SetEvent

WaitFor

Derived from TSynchroObject

Acquire

Release

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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TFloatField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TFloatField properties

TFloatField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TFloatField.AsFloat
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TFloatField events

TFloatField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TFloatField events

TFloatField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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


TIDispatchField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TInterfaceField properties

TInterfaceField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TIDispatchField.Value
 CLX 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.


 CLX Reference

TIDispatchField events

TIDispatchField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TIDispatchField events

TIDispatchField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TField

TInterfaceField

TIDispatchField


TInterfaceField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TInterfaceField properties

TInterfaceField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TInterfaceField.AsVariant
 CLX 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
 CLX 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.


 CLX Reference

TInterfaceField events

TInterfaceField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TInterfaceField events

TInterfaceField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TField

TInterfaceField


TIndexDef
 CLX 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 TClientDataSet.CreateDataSet.

Determine the name of an index.

Identify the fields that make up 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 TClientDataSet.AddIndex.


 CLX 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


 CLX Reference

TIndexDef properties

TIndexDef	By object	Legend

CaseInsFields

Collection

DescFields

DisplayName

Expression

FieldExpression

Fields

GroupingLevel

ID

Index

Name

Options

Source


TIndexDef.CaseInsFields
 CLX 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.


TIndexDef.DescFields
 CLX 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.


TIndexDef.Expression
 CLX 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. This property is only used on the Windows product, where there are components that can represent dBASE tables.


TIndexDef.Expression
 CLX 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 only used in the Windows product, where there are components that can represent dBASE tables. Developers should use the Fields or Expression properties instead.


TIndexDef.Fields
 CLX 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 (;).


TIndexDef.GroupingLevel
 CLX 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
 CLX Reference

TIndexDef.Options

TIndexDef	See also

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:	Primary indexes are, by definition unique. If setting the Options value ixPrimary, you need not also use ixUnique.


TIndexDef.Source
 CLX Reference

TIndexDef.Source

TIndexDef	See also

Contains the name of a dBASE maintained index.

property Source: String;

Description

Source is not used on the Linux platform. This property is available for the Windows product, where there are components that represent dBASE tables.


 CLX 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


 CLX 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
 CLX 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
 CLX 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


TListSourceLink
 CLX Reference

TListSourceLink

Hierarchy	Properties	Methods	See also

TListSourceLink helps manage the link to the ListSource of a TDBLookupControl object.

Unit

QDBCtrls

Description

TListSourceLink is tailored to work with TDBLookupControl. It should only be used by the TDBLookupControl class.


 CLX Reference

TListSourceLink properties

TListSourceLink	Alphabetically	Legend

Derived from TDataLink

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 CLX Reference

TListSourceLink properties

TListSourceLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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


TPacketDataSet
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TPacketDataSet properties

TPacketDataSet	By object	Legend

Active

ActiveAggs

AggFields

AppServer

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

ChangeCount

CloneSource

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

XMLData


TPacketDataSet.NewValuesModified
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TParam
 CLX 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.

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.


 CLX 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

ParamType

Text

Value

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 CLX 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

ParamType

Text

Value


TParam.AsBCD
 CLX 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
 CLX 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.

Note:	Applications seldom need to read AsBlob because Blob fields can’t be used as output parameters.


TParam.AsBoolean
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

Note:	It is not possible to store a NULL value directly to a parameter using AsDateTime. Use the TParam.Clear method instead.


TParam.AsFloat
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TParam.AsSmallInt
 CLX 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
 CLX Reference

TParam.AsSQLTimeStamp

TParam	See also	Example

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
 CLX 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.


TParam.AsTime
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.ParamType
 CLX Reference

TParam.ParamType

TParam

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.Text
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TParam.LoadFromStream
 CLX 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
 CLX 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
 CLX 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.

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
 CLX 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.

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.


 CLX Reference

TParams properties

TParams	Alphabetically	Legend

In TParams

Items

ParamValues

Derived from TCollection

Count

ItemClass


 CLX Reference

TParams properties

TParams	By object	Legend

Count

ItemClass

Items

ParamValues


TParams.Items
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TReferenceField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TReferenceField properties

TReferenceField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TReferenceField.AsVariant
 CLX 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
 CLX 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.


 CLX Reference

TReferenceField events

TReferenceField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TReferenceField events

TReferenceField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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


MatchesMask function
 CLX 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
 CLX 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.


TSmallintField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TSmallintField properties

TSmallintField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TSmallintField.DataSize
 CLX 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.


 CLX Reference

TSmallintField events

TSmallintField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TSmallintField events

TSmallintField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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


TSimpleEvent
 CLX Reference

TSimpleEvent

Hierarchy	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.


 CLX 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


 CLX 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
 CLX 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


TSQLBlobStream
 CLX 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.


 CLX Reference

TSQLBlobStream properties

TSQLBlobStream	Alphabetically	Legend

Derived from TCustomMemoryStream

Memory

Derived from TStream

Position

Size


 CLX Reference

TSQLBlobStream properties

TSQLBlobStream	By object	Legend

Memory

Position

Size


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TSQLClientDataSet properties

TSQLClientDataSet	By object	Legend

Active

ActiveAggs

AggFields

Aggregates

AggregatesActive

AppServer

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

ChangeCount

CloneSource

CommandText

CommandType

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

XMLData


TSQLClientDataSet.CommandText
 CLX 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
 CLX 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
 CLX 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 file. When you use the ConnectionName property, you must deploy the connections file with your application.


TSQLClientDataSet.DBConnection
 CLX 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
 CLX 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.


 CLX 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


 CLX 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


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TSQLResolver
 CLX 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.


 CLX Reference

TSQLResolver properties

TSQLResolver	Alphabetically	Legend

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TSQLResolver properties

TSQLResolver	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TSQLResolver methods

TSQLResolver	Alphabetically	Legend

In TSQLResolver

Create

Destroy

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSQLResolver.Create
 CLX 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
 CLX 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


TSQLStoredProc
 CLX 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.


 CLX Reference

TSQLStoredProc properties

TSQLStoredProc	Alphabetically	Legend

In TSQLStoredProc

StoredProcName

Derived from TCustomSQLDataSet

DataSource

DesignerData

IndexDefs

MaxBlobSize

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

ObjectView

RecNo

RecordSize

SparseArrays

State

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

TransactionLevel


 CLX Reference

TSQLStoredProc properties

TSQLStoredProc	By object	Legend

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

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


TSQLStoredProc.StoredProcName
 CLX 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.


 CLX 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


 CLX 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


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TSQLTable properties

TSQLTable	Alphabetically	Legend

In TSQLTable

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

MasterFields

MasterSource

TableName

Derived from TCustomSQLDataSet

DataSource

DesignerData

IndexDefs

MaxBlobSize

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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TSQLTable properties

TSQLTable	By object	Legend

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

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

Name

ObjectView

Owner

Prepared

RecNo

RecordCount

RecordSize

SparseArrays

SQLConnection

State

TableName

Tag

TransactionLevel


TSQLTable.IndexFieldCount
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TUpdateTree
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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


OnHTMLTag Example
 CLX 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
 CLX 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 = SQLQueryTableProducer1.Query.ParamCount then

    Response.Content := SQLQueryTableProducer1.Content;

  if Response.Content == '' then

    Handled := False; { indicate that the request was not handled }

  end;


Locate, Header, Content Example
 CLX 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;


Cookies, Add, Expires, Secure, Name, Value, Authorization Example
 CLX 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
 CLX 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;


Columns, Items, BgColor Example
 CLX 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;


TAbstractSocket
 CLX Reference

TAbstractSocket

Hierarchy	Properties	Methods	See also

TAbstractSocket is the abstract base class for all socket components.

Unit

Description

TAbstractSocket introduces properties and methods to enable an application to work with  sockets. A  socket encapsulates a set of communication protocols to allow the application to connect to other machines for reading or writing information. 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.


 CLX Reference

TAbstractSocket properties

TAbstractSocket	Alphabetically	Legend

In TAbstractSocket

Active

Address

Host

Port

Service

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TAbstractSocket properties

TAbstractSocket	By object	Legend

Active

Address

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Host

Name

Owner

Port

Service

Tag


TAbstractSocket.Active
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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. There are a number of standard service names such as ftp, http, finger, and time. Servers can specify additional services and their associated ports.

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.


 CLX Reference

TAbstractSocket methods

TAbstractSocket	Alphabetically	Legend

In TAbstractSocket

Close

DoActivate

Loaded

Open

SetActive

SetAddress

SetHost

SetPort

SetService

Derived from TComponent

BeforeDestruction

Create

Destroy

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


 CLX Reference

TAbstractSocket methods

TAbstractSocket	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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

Loaded

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetActive

SetAddress

SetHost

SetPort

SetService

SetSubComponent

UpdateAction


TAbstractSocket.Close
 CLX 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
 CLX 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.Loaded
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TADTField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TADTField properties

TADTField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TADTField.Size
 CLX 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.


 CLX Reference

TADTField events

TADTField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TADTField events

TADTField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TAggregateField properties

TAggregateField	By object	Legend

Active

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TAggregateField.Active
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TAggregateField events

TAggregateField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TAggregateField events

TAggregateField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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.


 CLX 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


 CLX Reference

TAggregate properties

TAggregate	By object	Legend

Active

AggHandle

AggregateName

Collection

DataSet

DataSize

DataType

DisplayName

Expression

GroupingLevel

ID

Index

IndexName

InUse

Visible


TAggregate.Active
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TAggregate events

TAggregate	Alphabetically 	Legend

In TAggregate

OnUpdate


 CLX Reference

TAggregate events

TAggregate	By object 	Legend

OnUpdate


TAggregate.OnUpdate
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TArrayField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TArrayField properties

TArrayField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TArrayField.Size
 CLX 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.


 CLX Reference

TArrayField events

TArrayField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TArrayField events

TArrayField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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


TBaseProvider
 CLX 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.

A provider derived from TBaseProvider is an intermediate link between a TClientDataSet object and a source dataset. The source dataset can reside in the same application as the client dataset, 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. 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.

Client datasets 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.


 CLX Reference

TBaseProvider properties

TBaseProvider	Alphabetically	Legend

In TBaseProvider

Options

Resolver

UpdateMode

Derived from TCustomProvider

Data

Exported

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TBaseProvider properties

TBaseProvider	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Data

DesignInfo

Exported

Name

Options

Owner

Resolver

Tag

UpdateMode


TBaseProvider.Options
 CLX 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.


TBaseProvider.Resolver
 CLX 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
 CLX 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.


 CLX Reference

TBaseProvider events

TBaseProvider	Alphabetically	Legend

In TBaseProvider

AfterUpdateRecord

BeforeUpdateRecord

OnGetData

OnUpdateData

OnUpdateError

Derived from TCustomProvider

OnDataRequest


 CLX Reference

TBaseProvider events

TBaseProvider	By object	Legend

AfterUpdateRecord

BeforeUpdateRecord

OnDataRequest

OnGetData

OnUpdateData

OnUpdateError


TBaseProvider.AfterUpdateRecord
 CLX 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
 CLX 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
 CLX 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.

Note:	OnGetData occurs when the Data property is read, as well as when the GetRecords method is called.


TBaseProvider.OnUpdateData
 CLX 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 . 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
 CLX 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.


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TBCDField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TBCDField properties

TBCDField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TBCDField.AsBCD
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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;


 CLX Reference

TBCDField events

TBCDField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TBCDField events

TBCDField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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


TBinaryField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TBinaryField properties

TBinaryField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TBinaryField.AsString
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TBinaryField events

TBinaryField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TBinaryField events

TBinaryField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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


TClientBlobStream
 CLX 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.


 CLX Reference

TClientBlobStream properties

TClientBlobStream	Alphabetically	Legend

Derived from TCustomMemoryStream

Memory

Derived from TStream

Position

Size


 CLX Reference

TClientBlobStream properties

TClientBlobStream	By object	Legend

Memory

Position

Size


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TCheckConstraints
 CLX Reference

TCheckConstraints

Hierarchy	Properties	Methods	See also

TCheckConstraints contains a collection of check constraints for a dataset component.

Unit

DB

Description

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.


 CLX Reference

TCheckConstraints properties

TCheckConstraints	Alphabetically	Legend

In TCheckConstraints

Items

Derived from TCollection

Count

ItemClass


 CLX Reference

TCheckConstraints properties

TCheckConstraints	By object	Legend

Count

ItemClass

Items


TCheckConstraints.Items
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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


TCheckConstraint
 CLX Reference

TCheckConstraint

Hierarchy	Properties	Methods

TCheckConstraint represents a record-level constraint on a dataset component.

Unit

DB

Description

Client dataset components implement a Constraints property that uses check constraints to represent record-level constraints. These constraints can be derived from the server and can be customized in applications. Each TCheckConstraint object represents an individual constraint associated with a dataset.


 CLX Reference

TCheckConstraint properties

TCheckConstraint	Alphabetically	Legend

In TCheckConstraint

CustomConstraint

ErrorMessage

FromDictionary

ImportedConstraint

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 CLX Reference

TCheckConstraint properties

TCheckConstraint	By object	Legend

Collection

CustomConstraint

DisplayName

ErrorMessage

FromDictionary

ID

ImportedConstraint

Index


TCheckConstraint.CustomConstraint
 CLX 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 settings.


TCheckConstraint.ErrorMessage
 CLX 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
 CLX Reference

TCheckConstraint.FromDictionary

TCheckConstraint

Reserved for future use.

property FromDictionary: Boolean;

Description

FromDictionary is only implemented for the Windows product, which has a data dictionary.


TCheckConstraint.ImportedConstraint
 CLX Reference

TCheckConstraint.ImportedConstraint

TCheckConstraint	See also

Contains the SQL text for a check constraint imported from a remote SQL database server.

property ImportedConstraint: string;

Description

ImportedConstraint stores the SQL text for a check constraint that is imported from the server. Although an application can set this property at runtime, ordinarily the text in ImportedConstraint is automatically provided to the application.

Note: On Linux, Delphi does not introduce any mechanism for importing server constraints. However, client datasets can receive imported constraints from application servers that are running on other platforms.


 CLX 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


 CLX 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
 CLX 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
 CLX 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


TClientDataSet
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TClientDataSet properties

TClientDataSet	By object	Legend

Active

ActiveAggs

AggFields

Aggregates

AggregatesActive

AppServer

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

ChangeCount

CloneSource

CommandText

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

XMLData


 CLX 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


 CLX 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


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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


TContainedObject
 CLX 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.

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.

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.


 CLX Reference

TContainedObject properties

TContainedObject	Alphabetically	Legend

Derived from TAggregatedObject

Controller


 CLX Reference

TContainedObject properties

TContainedObject	By object	Legend

Controller


 CLX 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


 CLX 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
 CLX Reference

TColumnTitle

Hierarchy	Properties	Methods	See also

TColumnTitle represents the title of a data-grid column (TColumn).

Unit

QDBGrids

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.


 CLX Reference

TColumnTitle properties

TColumnTitle	Alphabetically	Legend

In TColumnTitle

Alignment

Caption

Color

Column

Font


 CLX Reference

TColumnTitle properties

TColumnTitle	By object	Legend

Alignment

Caption

Color

Column

Font


TColumnTitle.Alignment
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TColumn
 CLX Reference

TColumn

Hierarchy	Properties	Methods	See also

TColumn represents a column in a data grid (TDBGrid).

Unit

QDBGrids

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.


 CLX Reference

TColumn properties

TColumn	Alphabetically	Legend

In TColumn

Alignment

AssignedValues

ButtonStyle

Color

DisplayName

DropDownRows

Expandable

Expanded

Field

FieldName

Font

Grid

ParentColumn

PickList

PopupMenu

ReadOnly

Showing

Title

Visible

Width

Derived from TCollectionItem

Collection

ID

Index


 CLX Reference

TColumn properties

TColumn	By object	Legend

Alignment

AssignedValues

ButtonStyle

Collection

Color

DisplayName

DropDownRows

Expandable

Expanded

Field

FieldName

Font

Grid

ID

Index

ParentColumn

PickList

PopupMenu

ReadOnly

Showing

Title

Visible

Width


TColumn.Alignment
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.ParentColumn
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TColumn methods

TColumn	Alphabetically	Legend

In TColumn

Assign

Create

DefaultAlignment

DefaultColor

DefaultFont

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


 CLX Reference

TColumn methods

TColumn	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultAlignment

DefaultColor

DefaultFont

DefaultHandler

DefaultReadOnly

DefaultWidth

Depth

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RestoreDefaults

SafeCallException


TColumn.Assign
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.DefaultReadOnly
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TConnectionBroker
 CLX 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.


 CLX Reference

TConnectionBroker properties

TConnectionBroker	Alphabetically	Legend

In TConnectionBroker

Connection

Derived from TCustomRemoteServer

AppServer

Derived from TCustomConnection

Connected

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TConnectionBroker properties

TConnectionBroker	By object	Legend

AppServer

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

Connection

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

Owner

Tag


TConnectionBroker.Connection
 CLX 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.


 CLX Reference

TConnectionBroker events

TConnectionBroker	Alphabetically	Legend

Derived from TCustomRemoteServer

OnGetUsername

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 CLX Reference

TConnectionBroker events

TConnectionBroker	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnGetUsername

OnLogin


 CLX 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

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServer

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TConnectionBroker.GetServer
 CLX 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


TCustomResolver
 CLX 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 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.


 CLX Reference

TCustomResolver properties

TCustomResolver	Alphabetically	Legend

In TCustomResolver

Provider

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCustomResolver properties

TCustomResolver	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Provider

Tag


TCustomResolver.Provider
 CLX 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.


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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.

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.


TCustomResolver.BeginUpdate
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 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
 CLX 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


TCriticalSection
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCurrencyField properties

TCurrencyField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


 CLX Reference

TCurrencyField events

TCurrencyField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TCurrencyField events

TCurrencyField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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


OnGetDataSetProperties, GetOptionalParam Example
 CLX 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
 CLX 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
 CLX 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
 CLX 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;


CloneCursor, GotoCurrent, FindKey, CompareBookmarks, SetRange Example
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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;


OnUpdateError, UpdateMode Example
 CLX Reference

OnUpdateError, UpdateMode Example

This OnUpdateError event handler fixes some updates that fail because the record could not be located on the database server. It changes the criteria for locating the record by setting the UpdateMode property to locate the record based only on key values and retries the update by setting the Response parameter to rrApply.

procedure TDataModule1.Provider1UpdateError(Sender: TObject; DataSet: TCustomClientDataSet; E: EUpdateError; UpdateKind: TUpdateKind;  var Response: TResolverResponse);

begin

  with Sender as TDataSetProvider do

  begin

    if UpdateMode <> upWhereKeyOnly then

    begin

      UpdateMode := upWhereKeyOnly;

      Response := rrApply;

    end;

  end;

end;


BeforeUpdateRecord Example
 CLX Reference

BeforeUpdateRecord Example

This BeforeUpdateRecord event handler checks records to be sure that delivery date is at least 7 days in the future. If the date is too early, itraises an exception to prevent the update.

procedure TDataModule1.Provider1BeforeUpdateRecord(Sender: TObject; SourceDS: TDataSet; DeltaDS: TCustomClientDataSet; UpdateKind: TUpdateKind; var Applied Boolean);

begin

  if UpdateKind <> ukDelete and

     DeltaDS.FieldByName('DeliveryDate').AsDateTime – Now < 7 then

    raise Exception.Create('You must allow at least 7 days for delivery.');

end;


CommandText Example
 CLX 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
 CLX 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;


TCustomCachedDataSet
 CLX 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 dbExpress.

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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomCachedDataSet properties

TCustomCachedDataSet	By object	Legend

Active

ActiveAggs

AggFields

Aggregates

AggregatesActive

AppServer

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

ChangeCount

CloneSource

CommandText

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

XMLData


TCustomCachedDataSet.Active
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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	Not used in CLX	Not used in CLX

typeADO	Not used in CLX	Not used in CLX

typeIBX	TIBDatabase	TIBQuery


TCustomCachedDataSet.UpdateMode
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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


TCustomSQLDataSet
 CLX 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.


 CLX Reference

TCustomSQLDataSet properties

TCustomSQLDataSet	Alphabetically	Legend

In TCustomSQLDataSet

BlobBuffer

CommandText

CommandType

CurrentBlobSize

DataLink

DataSource

DesignerData

DetailDataSet

IndexDefs

InternalConnection

LastError

MaxBlobSize

NativeCommand

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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomSQLDataSet properties

TCustomSQLDataSet	By object	Legend

Active

AggFields

AutoCalcFields

BlobBuffer

BlockReadSize

Bof

Bookmark

CanModify

CommandText

CommandType

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

ObjectView

Owner

ParamCheck

ParamCount

Params

Prepared

ProcParams

RecNo

RecordCount

RecordSize

RowsAffected

SchemaInfo

SortFieldNames

SparseArrays

SQLConnection

State

Tag

TransactionLevel


TCustomSQLDataSet.BlobBuffer
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.ParamCheck
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX Reference

TCustomSQLDataSet.CreateBlobStream

TCustomSQLDataSet	See also	Example

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 in a uniform manner.

GetFieldData returns a value that indicates whether the data was successfully fetched.


TCustomSQLDataSet.GetKeyFieldNames
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 (on Windows) or midas.so (on Linux) 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.

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 or TSQLClientDataSet.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomClientDataSet properties

TCustomClientDataSet	By object	Legend

Active

ActiveAggs

AggFields

Aggregates

AggregatesActive

AppServer

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

ChangeCount

CloneSource

CommandText

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

XMLData


TCustomClientDataSet.Active
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TCustomClientDataSet.ChangeCount

TCustomClientDataSet	See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TCustomClientDataSet.DSBase

TCustomClientDataSet	See also

Specifies the interface the client dataset uses to communicate with classes in Midas.dll (on Windows) or midas.so (on Linux).

property DSBase: IDSBase;

Description

Applications do not use the protected DSBase property. Client datasets use this interface internally to implement database operations.


TCustomClientDataSet.DSCursor
 CLX 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
 CLX 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
 CLX 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
 CLX 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. Client datasets support the following set of filter operations

Operator or  function	Example	Comment
Comparisons

=	State = 'CA'
<>	State <> 'CA'
>=	DateEntered >= '1/1/1998'
<=	Total <= 100,000
>	Percentile > 50
<	Field1 < Field2
BLANK	State <> 'CA' or State = BLANK	Blank records do not appear unless explicitly included in the filter.
IS NULL	Field1 IS NULL
IS NOT NULL	Field1 IS NOT NULL

Logical operators

and	State = 'CA' and Country = 'US'
or	State = 'CA' or State = 'MA'
not	not (State = 'CA')

Arithmetic operators

+	Total + 5 > 100	Applies to numbers, strings, or date (time) + number
-	Field1 - 7 <> 10	Applies to numbers, dates, or date (time) - number
*	Discount * 100 > 20	Applies to numbers only
/	Discount > Total / 5	Applies to numbers only

String functions

Upper	Upper(Field1) = 'ALWAYS'
Lower	Lower(Field1 + Field2) = 'josp'
Substring	Substring(DateString,8) = '1998' Substring(DateString,1,3) = 'JAN'	Value goes from position of second argument to end or number of chars in third arg. First char has position 1.
Trim	Trim(Field1 + Field2) Trim(Field1, '-')	removes third argument from front and back. If no third argument, trims spaces.
TrimLeft	TrimLeft(StringField) TrimLeft(Field1, '$') <> ''	See Trim
TrimRight	TrimRight(StringField) TrimRight(Field1, '.') <> ''	See Trim

DateTime functions

Year	Year(DateField) = 2000
Month	Month(DateField) <> 12
Day	Day(DateField) = 1
Hour	Hour(DateField) < 16
Minute	Minute(DateField) = 0
Second	Second(DateField) = 30
GetDate	GetDate - DateField > 7	Represents current date and time
Date	DateField = Date(GetDate)	Returns the date portion of a datetime value
Time	TimeField > Time(GetDate)	Returns the time portion of a datetime value

Miscellaneous

Like	Memo LIKE '%filters%'	Works like SQL-92 without the ESC clause. When applied to BLOB fields, FilterOptions determines whether case is considered.
In	Day(DateField) in (1,7)	Works like SQL-92. Second argument is a list of values all with the same type.
*	State = 'M*'	Wildcard for partial comparisons


TCustomClientDataSet.GroupingLevel
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TCustomClientDataSet.Params

TCustomClientDataSet	See also	Example

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 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 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
 CLX 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
 CLX 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. This property is passed as a parameter to IAppServer interface calls when the client fetches data from or applies updates to the source dataset or its database server.

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. ProviderName can be set from a drop-down in the Object Inspector once the RemoteServer property is set.


TCustomClientDataSet.ReadOnly
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TCustomClientDataSet events

TCustomClientDataSet	Alphabetically	Legend

In TCustomClientDataSet

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

OnReconcileError


 CLX Reference

TCustomClientDataSet events

TCustomClientDataSet	By object	Legend

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

OnReconcileError


TCustomClientDataSet.AfterApplyUpdates
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TCustomClientDataSet.ApplyUpdates

TCustomClientDataSet	See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TCustomClientDataSet.EmptyDataSet

TCustomClientDataSet	See also

Removes all records from the dataset.

procedure EmptyDataSet;

Description

Call EmptyDataSet to empty the client dataset.


TCustomClientDataSet.EnableConstraints
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TCustomClientDataSet.FetchParams

TCustomClientDataSet	See also	Example

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

GetFieldData returns a value that indicates whether the data was successfully fetched.


TCustomClientDataSet.GetGroupState
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TCustomClientDataSet.LoadFromStream
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TCustomClientDataSet.Post

TCustomClientDataSet	See also	Example

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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, 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 TSQLConnection or TSOAPConnection.


 CLX Reference

TCustomConnection properties

TCustomConnection	Alphabetically	Legend

In TCustomConnection

Connected

DataSetCount

DataSets

LoginPrompt

StreamedConnected

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCustomConnection properties

TCustomConnection	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

Owner

StreamedConnected

Tag


TCustomConnection.Connected
 CLX Reference

TCustomConnection.Connected

TCustomConnection	See also

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
 CLX 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 TSQLConnection), or it may list all datasets, regardless of whether they are active (as is the case with TSOAPConnection). 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
 CLX 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 TSQLConnection), or it may list all datasets, regardless of whether they are active (as is the case with TSOAPConnection). 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) 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
 CLX 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 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 SOAP 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 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 SOAP connection components, there is no built-in use for the user name and password supplied by the login dialog.

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
 CLX 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.


 CLX Reference

TCustomConnection events

TCustomConnection	Alphabetically	Legend

In TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 CLX Reference

TCustomConnection events

TCustomConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


TCustomConnection.AfterConnect
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TCustomConnection.OnLogin

TCustomConnection	See also

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 SOAP 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:	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.


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 dbExpress datasets, this is when they are activated. For client datasets, this is when the RemoteServer property is assigned.


TCustomConnection.SendConnectEvent
 CLX 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
 CLX 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
 CLX 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 dbExpress datasets, this is when they are deactivated. For client datasets, this is when the RemoteServer property is changed.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection


TCustomDBGrid
 CLX 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

QDBGrids

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.


 CLX 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

ClientRect

EditorMode

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomDBGrid properties

TCustomDBGrid	By object	Legend

Action

Align

Anchors

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Columns

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataLink

DataSource

DefaultDrawing

DesignInfo

EditorMode

Enabled

FieldCount

Fields

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

IndicatorOffset

LayoutLock

Left

Name

Options

Owner

Parent

ParentWidget

ReadOnly

SelectedField

SelectedIndex

SelectedRows

ShowHint

Showing

TabOrder

TabStop

Tag

TitleFont

Top

UpdateLock

Visible

Width


TCustomDBGrid.Columns
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TCustomDBGrid events

TCustomDBGrid	Alphabetically	Legend

In TCustomDBGrid

OnCellClick

OnColEnter

OnColExit

OnColumnMoved

OnDrawColumnCell

OnDrawDataCell

OnEditButtonClick

OnTitleClick


 CLX Reference

TCustomDBGrid events

TCustomDBGrid	By object	Legend

OnCellClick

OnColEnter

OnColExit

OnColumnMoved

OnDrawColumnCell

OnDrawDataCell

OnEditButtonClick

OnTitleClick


TCustomDBGrid.OnCellClick
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TCustomDBGrid methods

TCustomDBGrid	Alphabetically	Legend

In TCustomDBGrid

AcquireLayoutLock

BeginColumnDrag

BeginLayout

BeginUpdate

BoundsChanged

CalcScrollBarVisible

CalcSizingState

CalcTitleRec

CancelLayout

CanEditAcceptKey

CanEditModify

CanEditShow

CellClick

CheckColumnDrag

ColEnter

ColExit

ColumnAtDepth

ColumnMoved

ColWidthsChanged

Create

CreateColumns

CreateEditor

DataToRawColumn

DefaultDrawColumnCell

DefaultDrawDataCell

DeferLayout

DefineFieldMap

DefineProperties

Destroy

DrawCell

DrawColumnCell

DrawDataCell

DoExit

EditButtonClick

EndColumnDrag

EndLayout

EndUpdate

EventFilter

ExecuteAction

FontChanged

GetColField

GetEditLimit

GetEditMask

GetEditText

GetFieldValue

GridKeyPress

HighlightCell

InvalidateTitles

KeyDown

LayoutChanged

LinkActive

Loaded

ModifyScrollBar

MouseDown

MouseUp

Notification

ParentFontChanged

RawToDataColumn

Scroll

SetColumnAttributes

SetEditText

ShowPopupEditor

StoreColumns

TimedScroll

TitleClick

TopLeftChanged

UpdateAction

UseRightToLeftAlignmentForField

ValidFieldIndex

Derived from TCustomGrid

MouseCoord

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

Invalidate

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

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


 CLX Reference

TCustomDBGrid methods

TCustomDBGrid	By object	Legend

AcquireLayoutLock

AfterConstruction

Assign

BeforeDestruction

BeginColumnDrag

BeginDrag

BeginLayout

BeginUpdate

BoundsChanged

BringToFront

Broadcast

CalcScrollBarVisible

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

CreateEditor

CreateParented

CreateParentedControl

DataToRawColumn

DefaultDrawColumnCell

DefaultDrawDataCell

DefaultHandler

DeferLayout

DefineFieldMap

DefineProperties

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DoExit

DragDrop

Dragging

DrawCell

DrawColumnCell

DrawDataCell

EditButtonClick

EnableAlign

EndColumnDrag

EndDrag

EndLayout

EndUpdate

EventFilter

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

FontChanged

Free

FreeInstance

FreeNotification

GetColField

GetEditLimit

GetEditMask

GetEditText

GetFieldValue

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GridKeyPress

HandleAllocated

HandleNeeded

HasParent

Hide

HighlightCell

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvalidateTitles

InvokeHelp

IsImplementorOf

KeyDown

LayoutChanged

LinkActive

Loaded

MethodAddress

MethodName

ModifyScrollBar

MouseCoord

MouseDown

MouseUp

NewInstance

Notification

ParentFontChanged

ParentToClient

RawToDataColumn

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

Scroll

ScrollBy

SendToBack

SetBounds

SetColumnAttributes

SetEditText

SetFocus

SetSubComponent

Show

ShowPopupEditor

StoreColumns

TimedScroll

TitleClick

TopLeftChanged

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignmentForField

ValidFieldIndex


TCustomDBGrid.AcquireLayoutLock
 CLX 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
 CLX 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
 CLX 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
 CLX 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.BoundsChanged
 CLX Reference

TCustomDBGrid.BoundsChanged

TCustomDBGrid	See also

Adjusts the appearance of the grid when it is resized.

procedure BoundsChanged; override;

Description

Applications cannot call this protected method. Controls call BoundsChanged internally when they are resized.

TCustomDBGrid overrides the BoundsChanged method to update the number of rows of data that must be buffered and to ensure that the grid is repainted correctly.


TCustomDBGrid.CalcScrollBarVisible
 CLX Reference

TCustomDBGrid.CalcScrollBarVisible

TCustomDBGrid	See also

Indicates whether the grid needs to display its scroll bars.

function CalcScrollBarVisible(ScrollBar: TScrollStyle; const AxisInfo: TGridAxisDrawInfo; Max: Integer): boolean; override;

Description

Applications cannot call this protected method. Grids call CalcScrollBarVisible internally to determine whether they need to display scrollbars.

ScrollBar is the scrollbar in question. This value is either ssHorizontal or ssVertical (CalcScrollBarVisible is never called with ScrollBar set to ssNone or ssBoth).

AxisInfo contains information about the size of the axis and the type and number of cells along it.

Max is the maximum row or column index required along the axis.

CalcScrollBarVisible returns True if the scrollbar indicated by ScrollBar should be displayed. It returns False if there is no need to display the scrollbar.


TCustomDBGrid.CalcSizingState
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.CreateEditor
 CLX 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.DataToRawColumn
 CLX 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
 CLX 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
 CLX 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.DeferLayout
 CLX 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
 CLX 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
 CLX 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
 CLX 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.DoExit
 CLX Reference

TCustomDBGrid.DoExit

TCustomDBGrid	See also

Writes updates to the dataset when input focus shifts away from the grid.

procedure DoExit; override;

Description

Applications cannot call this protected method. It is called automatically when input focus shifts to another control.

In TCustomDBGrid, DoExit makes sure that any edits are written to the dataset and then generates an OnExit event.


TCustomDBGrid.DrawCell
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.EventFilter
 CLX Reference

TCustomDBGrid.EventFilter

TCustomDBGrid	See also

Responds to system events.

function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; override;

Description

EventFilter is called automatically in response to events detected by the underlying widget. Such events include mouse events, keyboard events, system changes (such as changes to the palette), and changes to the underlying widget (moves, resizes, or the need to repaint). EventFilter gives the control an opportunity to respond to the event that occurred.

Sender is the handle to the underlying widget that receives the event. This is the same as the Handle property.

Event is the handle to the Qt event object. This object provides information about the event that occurred.

EventFilter returns True if the control bar handles the event, False otherwise.

TCustomDBGrid overrides the inherited method to respond to mouse clicks.

Note:	When overriding the EventFilter method, be sure to call the inherited method so that the default event processing can occur.


TCustomDBGrid.ExecuteAction
 CLX 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.FontChanged
 CLX Reference

TCustomDBGrid.FontChanged

TCustomDBGrid	See also

Ensures that the grid reflects the new value when the font property changes.

procedure FontChanged; override;

Description

Applications cannot call this protected method. It is called automatically when the font property changes.

FontChanged propogates the new font value to its columns and forces a repaint so that the new font is displayed.


TCustomDBGrid.GetColField
 CLX 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
 CLX 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
 CLX Reference

TCustomDBGrid.GetEditMask

TCustomDBGrid	See also

Returns the input mask associated with the field for the selected cell.

function GetEditMask(ACol, ARow: Longint): WideString; 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.GetEditText
 CLX Reference

TCustomDBGrid.GetEditText

TCustomDBGrid	See also

Returns the value of the indicated cell formatted for editing.

function GetEditText(ACol, ARow: Longint): WideString; 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
 CLX 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.GridKeyPress
 CLX Reference

TCustomDBGrid.GridKeyPress

TCustomDBGrid	See also

Responds when the user presses a key.

procedure GridKeyPress(var Key: Char); override;

Description

When the user presses a key, first the KeyDown method is called, then the KeyPress method, which (directly or indirectly) calls GridKeyPress, and finally the KeyUp method when the user releases the key. GridKeyPress overrides the inherited method to write edits to the dataset when the user presses Return.


TCustomDBGrid.HighlightCell
 CLX 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
 CLX 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
 CLX 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.LayoutChanged
 CLX 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
 CLX 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
 CLX 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.ModifyScrollBar
 CLX Reference

TCustomDBGrid.ModifyScrollBar

TCustomDBGrid

Scrolls the grid in response to user actions.

procedure ModifyScrollBar(ScrollBar: TScrollBarKind; ScrollCode: TScrollCode; Pos: Cardinal; UseRightToLeft: Boolean); override;

Description

Applications cannot call this protected method. It is called automatically in response to user actions. ModifyScrollBar scrolls the grid in the requested manner.

ScrollBar indicates whether the user is trying to scroll horizontally or vertically.

ScrollCode indicates what type of scrolling action the user requested.

Pos is the new position of the scroll bar.

UseRightToLeft indicates whether the forward direction of scrolling is from right to left (bottom to top).


TCustomDBGrid.MouseDown
 CLX 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
 CLX 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
 CLX 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.ParentFontChanged
 CLX Reference

TCustomDBGrid.ParentFontChanged

TCustomDBGrid	See also

Updates the font if necessary when the parent control’s font changes.

procedure ParentFontChanged; override;

Description

Applications cannot call this protected method. It is called automatically when the parent control’s font property changes or when the Parent property changes.

ParentFontChanged checks whether ParentFont is True, and if so, updates the Font and TitleFont properties.


TCustomDBGrid.RawToDataColumn
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TCustomDBGrid.SetEditText

TCustomDBGrid	See also

Updates the edited version of the current cell’s data.

procedure SetEditText(ACol, ARow: Longint; const Value: WideString); 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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. UseRightToLeftAlignment returns True if the value of Alignment should be reversed.


TCustomDBGrid.ValidFieldIndex
 CLX 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

TWidgetControl

TCustomControl

TCustomGrid

TCustomDBGrid


TCustomProvider
 CLX 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.

A provider derived from TCustomProvider is an intermediate link between TClientDataSet object and a source dataset. The source dataset can reside in the same application as the client dataset, 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. 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.

Client datasets 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.


 CLX Reference

TCustomProvider properties

TCustomProvider	Alphabetically	Legend

In TCustomProvider

Data

Exported

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCustomProvider properties

TCustomProvider	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Data

DesignInfo

Exported

Name

Owner

Tag


TCustomProvider.Data
 CLX 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
 CLX 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.


 CLX Reference

TCustomProvider events

TCustomProvider	Alphabetically	Legend

In TCustomProvider

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

OnDataRequest


 CLX Reference

TCustomProvider events

TCustomProvider	By object	Legend

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

OnDataRequest


TCustomProvider.AfterApplyUpdates
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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. 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TCustomRemoteServer
 CLX 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.


 CLX Reference

TCustomRemoteServer properties

TCustomRemoteServer	Alphabetically	Legend

In TCustomRemoteServer

AppServer

Derived from TCustomConnection

Connected

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCustomRemoteServer properties

TCustomRemoteServer	By object	Legend

AppServer

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

Owner

Tag


TCustomRemoteServer.AppServer
 CLX 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.

Note:	To use the IAppServer methods of the application server’s interface, obtain an interface using the GetServer method instead.


 CLX Reference

TCustomRemoteServer events

TCustomRemoteServer	Alphabetically	Legend

In TCustomRemoteServer

OnGetUsername

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 CLX Reference

TCustomRemoteServer events

TCustomRemoteServer	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnGetUsername

OnLogin


TCustomRemoteServer.OnGetUsername
 CLX 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.


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 fetched from the server machine.


TCustomRemoteServer.SetAppServer
 CLX 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


TDataLink
 CLX 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.


 CLX Reference

TDataLink properties

TDataLink	Alphabetically	Legend

In TDataLink

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount

VisualControl


 CLX Reference

TDataLink properties

TDataLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount

VisualControl


TDataLink.Active
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 two descendants: TCustomSQLDataSet and TCustomClientDataSet.

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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDataSet properties

TDataSet	By object	Legend

Active

ActiveRecord

AggFields

AutoCalcFields

BlobFieldCount

BlockReadSize

Bof

Bookmark

BookmarkSize

BufferCount

Buffers

CalcBuffer

CalcFieldsSize

CanModify

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


TDataSet.Active
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TDataSet.Constraints
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 support field comparisons. For example:

Field1 > Field2

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

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
 CLX 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 TClientDataSet is accessed. RecNo provides a fallback property for derived datasets that do not support record numbers.


TDataSet.RecordCount
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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 SQLConnection component when the dataset is closed.

AfterClose is called after a dataset is closed and the dataset state is set to dsInactive.


TDataSet.AfterDelete
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TDataSet.AfterPost

TDataSet	See also 	Example

Occurs after an application writes the active record to the 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TDataSet.BeforeClose

TDataSet	See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TDataSet.BeforePost

TDataSet	See also 	Example

Occurs before an application posts changes for the active record to the 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.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.

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
 CLX 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
 CLX 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.


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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
 CLX 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 change log using Post (Client datasets can subsequently apply updates in the change log back to the database by calling ApplyUpdates.) After the new record is applied back to the database server, its physical location is database-specific. For indexed tables, the index is updated with the new record information.


TDataSet.AppendRecord
 CLX 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 change log.

The newly appended record becomes the active record.


TDataSet.BookmarkValid
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 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
 CLX 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
 CLX 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
 CLX 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 change log using Post. (Client datasets can subsequently apply updates in the change log back to the database by calling ApplyUpdates.) After the new record is applied back to the database server, its physical location is database-specific. For indexed tables, the index is updated with the new record information.


TDataSet.InsertRecord
 CLX 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 change log.

The newly inserted record becomes the active record.


TDataSet.IsEmpty
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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:

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 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
 CLX 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.

Custom datasets can use Translate to convert strings betweenUTF-8 (the native character mapping for dataset components) and any character mapping used by the underlying data access mechanism. When ToOem is True, Translate converts from ANSI to the underlying data access mapping. When ToOem is False, Translate reverses that conversion.


TDataSet.UpdateCursorPos
 CLX 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
 CLX Reference

TDataSet.UpdateRecord

TDataSet

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. Applications should not need to call UpdateRecord directly unless they provide custom dataset methods that bypass TDataSet methods.


TDataSet.UpdateStatus
 CLX 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


TDataSource
 CLX 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.


 CLX Reference

TDataSource properties

TDataSource	Alphabetically	Legend

In TDataSource

AutoEdit

DataSet

Enabled

State

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TDataSource properties

TDataSource	By object	Legend

AutoEdit

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSet

DesignInfo

Enabled

Name

Owner

State

Tag


TDataSource.AutoEdit
 CLX 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
 CLX 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 := ClientDataSet1;

Note:	To link a dataset that resides in a data module to a form at design-time, choose File | Use unit.


TDataSource.Enabled
 CLX 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
 CLX 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.


 CLX Reference

TDataSource events

TDataSource	Alphabetically	Legend

In TDataSource

OnDataChange

OnStateChange

OnUpdateData


 CLX Reference

TDataSource events

TDataSource	By object	Legend

OnDataChange

OnStateChange

OnUpdateData


TDataSource.OnDataChange
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TDataSource methods

TDataSource	Alphabetically	Legend

In TDataSource

Create

Destroy

Edit

IsLinkedTo

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsLinkedTo

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TDataSource.Create
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TDateField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TDateField properties

TDateField	By object	Legend

Alignment

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TDateField.DataSize
 CLX 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.


 CLX Reference

TDateField events

TDateField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TDateField events

TDateField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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


TDateTimeField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TDateTimeField properties

TDateTimeField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TDateTimeField.AsDateTime
 CLX 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
 CLX 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
 CLX 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
 CLX 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 default date and time format. 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.


TDateTimeField.AsVariant
 CLX 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
 CLX 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
 CLX 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.

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
 CLX 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.


 CLX Reference

TDateTimeField events

TDateTimeField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TDateTimeField events

TDateTimeField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

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


 CLX 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

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
 CLX 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


TDataSetProvider
 CLX 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 and to resolve updates from that client dataset back to the dataset or to its underlying database server. TDataSetProvider can be a part of the same application as the client dataset, 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. 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.

Client datasets 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TDataSetProvider properties

TDataSetProvider	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

Data

DataSet

DesignInfo

Exported

Name

Options

Owner

Params

Resolver

ResolveToDataSet

Tag

UpdateMode


TDataSetProvider.Constraints
 CLX 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.


TDataSetProvider.DataSet
 CLX 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. 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 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
 CLX 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, 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
 CLX 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).


 CLX 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


 CLX 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
 CLX 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
 CLX 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. 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.


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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. 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TDataSourceLink
 CLX Reference

TDataSourceLink

Hierarchy	Properties	Methods	See also

TDataSourceLink helps manage the link to the data source for a TDBLookupControl object.

Unit

QDBCtrls

Description

TDataSourceLink is tailored to work with TDBLookupControl. It should only be used by the TDBLookupControl class.


 CLX Reference

TDataSourceLink properties

TDataSourceLink	Alphabetically	Legend

Derived from TDataLink

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 CLX Reference

TDataSourceLink properties

TDataSourceLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TDBCheckBox
 CLX 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

QDBCtrls

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.


 CLX Reference

TDBCheckBox properties

TDBCheckBox	Alphabetically	Legend

In TDBCheckBox

DataField

DataSource

Field

ReadOnly

ValueChecked

ValueUnchecked

Derived from TCustomCheckBox

AllowGrayed

Checked

Handle

State

Derived from TButtonControl

Caption

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDBCheckBox properties

TDBCheckBox	By object	Legend

Action

Align

AllowGrayed

Anchors

BoundsRect

Brush

Caption

Checked

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataField

DataSource

DesignInfo

DragMode

Enabled

Field

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ReadOnly

ShowHint

Showing

State

TabOrder

TabStop

Tag

Top

ValueChecked

ValueUnchecked

Visible

Width


TDBCheckBox.DataField
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TDBCheckBox events

TDBCheckBox	Alphabetically	Legend

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TDBCheckBox events

TDBCheckBox	By object	Legend

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TDBCheckBox methods

TDBCheckBox	Alphabetically	Legend

In TDBCheckBox

Create

Destroy

ExecuteAction

UpdateAction

Derived from TCustomCheckBox

Toggle

Derived from TButtonControl

AccelChar

AnimateClick

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

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


 CLX Reference

TDBCheckBox methods

TDBCheckBox	By object	Legend

AccelChar

AfterConstruction

AnimateClick

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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Toggle

Update

UpdateAction

UpdateControlState


TDBCheckBox.Create
 CLX 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
 CLX 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
 CLX 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
 CLX 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

TWidgetControl

TButtonControl

TCustomCheckBox

TDBCheckBox


TDBComboBox
 CLX Reference

 TDBComboBox

Hierarchy	Properties	Methods	Events 	Using TDBComboBox	See also

TDBComboBox represents a data-aware combo box control.

Unit

QDBCtrls

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.


 CLX Reference

TDBComboBox properties

TDBComboBox	Alphabetically	Legend

In TDBComboBox

DataField

DataSource

Field

Items

ReadOnly

Style

Text

Derived from TCustomComboBox

Canvas

CharCase

DropDownCount

DroppedDown

Handle

ItemHeight

ItemIndex

Items

SelLength

SelStart

SelText

Sorted

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDBComboBox properties

TDBComboBox	By object	Legend

Action

Align

Anchors

BoundsRect

Brush

Canvas

CharCase

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataField

DataSource

DesignInfo

DragMode

DropDownCount

DroppedDown

Enabled

Field

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

ItemHeight

ItemIndex

Items

Items

Left

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ReadOnly

SelLength

SelStart

SelText

ShowHint

Showing

Sorted

Style

TabOrder

TabStop

Tag

Text

Top

Visible

Width


TDBComboBox.DataField
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 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,  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.


TDBComboBox.Text
 CLX Reference

TDBComboBox.Text

TDBComboBox	See also

Specifies the value in the edit portion of the combo box.

property Text: TStrings;

Description

Use Text to supply read a field value from the combo box or assign a value to the field that the combo box represents. If the combo box has the style csDropDownList, then the value of Text is the same as the item in the drop-down list identified by the ItemIndex property. For other styles of combo boxes, the value of Text can be a value that is not included in the drop-down list.


 CLX Reference

TDBComboBox events

TDBComboBox	Alphabetically	Legend

Derived from TCustomComboBox

OnChange

OnDrawItem

OnDropDown

OnMeasureItem

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnStartDrag


 CLX Reference

TDBComboBox events

TDBComboBox	By object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDrawItem

OnDropDown

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMeasureItem

OnStartDrag


 CLX Reference

TDBComboBox methods

TDBComboBox	Alphabetically	Legend

In TDBComboBox

Create

Destroy

ExecuteAction

UpdateAction

Derived from TCustomComboBox

Clear

Focused

SelectAll

SetBounds

Sort

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

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


 CLX Reference

TDBComboBox methods

TDBComboBox	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Sort

Update

UpdateAction

UpdateControlState


TDBComboBox.Create
 CLX 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
 CLX 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
 CLX 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
 CLX 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

TWidgetControl

TCustomComboBox

TDBComboBox


TDBEdit
 CLX 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

QDBCtrls

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.


 CLX 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

CharCase

Handle

Modified

SelLength

SelStart

SelText

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDBEdit properties

TDBEdit	By object	Legend

Action

Align

Anchors

AutoSelect

AutoSize

BorderStyle

BoundsRect

Brush

CharCase

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataField

DataSource

DesignInfo

DragMode

EditText

Enabled

Field

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

IsMasked

Left

MaxLength

Modified

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ReadOnly

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

Text

Top

Visible

Width


TDBEdit.DataField
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TDBEdit events

TDBEdit	Alphabetically	Legend

Derived from TCustomEdit

OnChange

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TDBEdit events

TDBEdit	By object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TDBEdit methods

TDBEdit	Alphabetically	Legend

In TDBEdit

Create

Destroy

ExecuteAction

UpdateAction

Derived from TCustomMaskEdit

Clear

GetTextLen

ValidateEdit

Derived from TCustomEdit

ClearSelection

CopyToClipboard

CutToClipboard

GetSelTextBuf

PasteFromClipboard

SelectAll

SetSelTextBuf

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

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


 CLX Reference

TDBEdit methods

TDBEdit	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

PasteFromClipboard

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSelTextBuf

SetSubComponent

Show

Update

UpdateAction

UpdateControlState

ValidateEdit


TDBEdit.Create
 CLX 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
 CLX 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.ExecuteAction
 CLX 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.UpdateAction
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomEdit

TCustomMaskEdit

TDBEdit


AddParam, RemoveParam example
 CLX 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
 CLX Reference

AfterCancel example

This example updates the form’s status bar with a message when an AfterCancel event occurs.

procedure TForm1.ClientDataSet1AfterCancel(DataSet: TDataSet);

begin

  StatusBar1.SimpleText := 'Record changes cancelled for ' + DataSet.Name;

end;


AfterDelete, Format example
 CLX Reference

AfterDelete, Format example

This example displays a message on the form’s status bar indicating the dataset’s record count after a record is deleted.

procedure TForm1.ClientDataSet1AfterDelete(DataSet: TDataSet);

begin

  StatusBar1.SimpleText := Format('There are now %d records in the table', [DataSet.RecordCount]);

end;


AfterEdit example
 CLX Reference

AfterEdit example

This example updates the form’s status bar with a message when an AfterEdit event occurs.

procedure TForm1.ClientDataSet1AfterEdit(DataSet: TDataSet);

begin

   StatusBar1.SimpleText := 'Editing record' + IntToStr(DataSet.RecNo);

end;


AfterInsert example
 CLX Reference

AfterInsert example

This example updates the form’s status bar with a message when an AfterInsert event occurs.

procedure TForm1.ClientDataSet1AfterInsert(DataSet: TDataSet);

begin

   StatusBar1.SimpleText := 'Inserting new record';

end;


AfterOpen example
 CLX Reference

AfterOpen example

This example updates the form’s status bar with a message when an AfterOpen event occurs.

procedure TForm1.ClientDataSet1AfterOpen(DataSet: TDataSet);

begin

  {// now that the dataset is open, record information is available }

  StatusBar1.SimpleText := 'Record ' + IntToStr(ClientDataSet1.RecNo) + 'of ' + IntToStr(ClientDataSet1.RecordCount);

end;


AfterPost example
 CLX Reference

AfterPost example

This example updates the form’s status bar with a message when an AfterPost event occurs.

procedure TForm1.ClientDataSet1AfterPost(DataSet: TDataSet);

begin

  StatusBar1.SimpleText := 'Record changes complete';

end;


AfterScroll, RefreshRecord example
 CLX 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
 CLX Reference

Append, FieldValues, Post example

This example appends a new record to a client dataset 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

ClientDataSet1.Append;

ClientDataSet1.FieldValues['ALPHANUMERIC'] := Edit1.text;

ClientDataSet1.FieldValues['INTEGER'] := StrToInt(Edit2.text);

ClientDataSet1.Post;

end;


AppendRecord example
 CLX Reference

AppendRecord 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, 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
 CLX 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
 CLX Reference

AsDateTime example

The following statement converts a string to a date for insertion into a date field:

ClientDataSet1.FieldByName('TimeStamp').AsDateTime := StrToDateTime(Now);


Assign example
 CLX 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
 CLX Reference

Create, Assign, AssignValues example

var SavedParams: TParams;

{ Initialize SavedParams }

SavedParams := TParams.Create;

try

  { Save the parameters for SQLDataSet1 }

  SavedParams.Assign(SQLDataSet1.Params);

  { Do something with SQLDataSet1 }

  ...

  { Restore the parameters to SQLDataSet1 }

  SQLDataSet1.Params.AssignValues(SavedParams);

finally

  SavedParams.Free;

end;


BeforeInsert, Insert, AsInteger, FieldByName Example
 CLX 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 dataset will succeed.

procedure TForm1.ClientDataSet1BeforeInsert(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

  ClientDataSet1.Insert;

  ClientDataSet1.FieldByName('QUANTITY').AsInteger := StrToInt(Edit1.Text);

  ClientDataSet1.Post;

end;


BeforePost, Abort Example
 CLX 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.ClientDataSet1BeforePost(DataSet: TDataSet);

begin

if DBEdit1.Text = '' then

  Abort;

end;


GetBookmark, GotoBookmark, FreeBookmark, FindPrior, Value, OnDataChange, Bof Example
 CLX 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

   withClientDataSet1 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.ClientDataSet1DataChange(Sender: TObject; Field: TField);

begin

  if ClientDataSet1.Bof then

    CopyData.Enabled := False

  else

    CopyData.Enabled := True;

end;


BtnClick Example
 CLX 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
 CLX 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
 CLX 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

  ClientDataSet1.Post

else

  ClientDataSet1.Cancel;


Count, Items, IsNull Example
 CLX 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;


CreateBlobStream, Edit example
 CLX Reference

CreateBlobStream, Edit example

The following example copies the data in the Notes field of SQLDataSet1 to the Remarks field of ClientDataSet1.

procedure TForm1.Button1Click(Sender: TObject);

var

  Stream1, Stream2 : TStream;

begin

  Stream1 := SQLDataSet1.CreateBlobStream(SQLDataSet1.FieldByName('Notes', bmRead);

  try

    ClientDataSet1.Edit;

    Stream2 := ClientDataSet1.CreateBlobStream(ClientDataSet1.FieldByName('Remarks'), bmReadWrite);

    try

      Stream2.CopyFrom(Stream1, Stream1.Size);

      ClientDataSet1.Post;

    finally

      Stream2.Free;

    end;

  finally

    Stream1.Free;

  end;

end;


Active, SQLConnection example
 CLX 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;


DisableControls, EnableControls, Eof Example
 CLX 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
 CLX 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
 CLX Reference

EditKey, GotoKey example

The following code uses the EditKey and GotoKey methods to move to a particular record on ClientDataSet1.  The actual field values are not changed when making the assignments because of the call to EditKey.

with ClientDataSet1 do

begin

  EditKey;

  FieldByName('State').AsString := 'CA';

  FieldByName('City').AsString := 'Santa Barbara';

  GotoKey;

end;


Connected, Execute example
 CLX 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
 CLX 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
 CLX 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

  if SQLDataSet1.CommandType = ctTable then

  begin

    Info := 'The fields of table ' + SQLDataSet1.CommandText +

           ' are:'#10#10;

    for i := 0 to SQLDataSet1.FieldCount - 1 do

      Info := Info + SQLDataSet1.Fields[i].FieldName + #10;

    ShowMessage(Info);

  end;

end;


FindField, AsString Example
 CLX Reference

FindField, AsString example

withClientDataSet1 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
 CLX 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;


IsBlob, DataSize, GetData, DisplayName example
 CLX 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
 CLX 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;


SetKey, GotoNearest example
 CLX Reference

SetKey, GotoNearest example

with ClientDataSet1 do

begin

  SetKey;

  FieldByName('State').AsString := 'CA';

  FieldByName('City').AsString := 'Santa';

  GotoNearest;

end;


InsertRecord Example
 CLX 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]);


AutoDisplay, LoadMemo Example
 CLX 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;


NextRecordSet example
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

OnFilterRecord Example

The following example filters records based on the current value in an edit control.

procedure TForm1.Table1FilterRecord(DataSet: TDataSet; var Accept: Boolean);

begin

  Accept := DataSet['AmountOfPurchase'] > StrToInt(Edit1.Text);

end;


ParamByName, CreateParam Example
 CLX 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;


FetchParams, Params, DataType, StrToIntDef, AsXXX example
 CLX Reference

FetchParams, Params, DataType, StrToIntDef, AsXXX example

This example fills in the parameters of a client dataset from the entries of a list box.

var

  I: Integer;

  ListItem: string;

begin

  { Call FetchParams to ensure parameters reflect server metadata }

  ClientDataSet1.FetchParams;

  with ClientDataSet1.Params do

  begin

    for I := 0 to Count - 1 do

    begin

      ListItem := ListBox1.Items[I];

      case Items[I].DataType of

        ftString:

          Items[I].AsString := ListItem;

        ftSmallInt:

          Items[I].AsSmallInt := StrToIntDef(ListItem, 0);

        ftInteger:

          Items[I].AsInteger := StrToIntDef(ListItem, 0);

        ftWord:

          Items[I].AsWord := StrToIntDef(ListItem, 0);

        ftBoolean:

          begin

            if ListItem = 'True' then

              Items[I].AsBoolean := True

            else

              Items[I].AsBoolean := False;

          end;

        ftFloat:

          Items[I].AsFloat := StrToFloat(ListItem);

        ftCurrency:

          Items[I].AsCurrency := StrToFloat(ListItem);

        ftBCD:

          Items[I].AsBCD := StrToCurr(ListItem);

        ftDate:

          Items[I].AsDate := StrToDate(ListItem);

        ftTime:

          Items[I].AsTime := StrToTime(ListItem);

        ftDateTime:

          Items[I].AsDateTime := StrToDateTime(ListItem);

        ftSQLTimeStamp:

          Items[I].AsSQLTimeStamp := StrToSQLTimeStamp(ListItem);

      end;

    end;

  end;

end;


CommandTYpe, CommandText, Params, ExecSQL example
 CLX 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;


ParamByName, Prepared Example
 CLX 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


SetData Example
 CLX Reference

SetData example

var I: Longint;

begin

  I := Customers.FieldByName('CustID').AsInteger;

{ Set the data }

  OrderQuery.ParamByName('CustNo').SetData(@I);

end;


SetData Example
 CLX 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;


SQL example
 CLX 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
 CLX 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];


Write, State example
 CLX 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, Update, Count, Items, FIelds, Name Example
 CLX Reference

IndexDefs, IndexName, Update, Count, Items, Fields, Name 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
 CLX 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
 CLX 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
 CLX 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;


InTransaction, StartTransaction, ParamValues, Commit, Rollback Example
 CLX 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;


DataSetCount, DataSets Example
 CLX 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;


Items Example
 CLX 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

  SQLDataSet1.Active := True;

  for i:= 1 toSQLDataSet1.FieldDefs.Count - 1 do

  begin

    ListBox1.Items.Add(SQLDataSet1.FieldDefs[i].Name);

  end;

  SQLDataSet1.Active := False;

end;


BeforeConnect, LoginPrompt, Params example
 CLX 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;


SetRange, CancelRange, Refresh Example
 CLX Reference

SetRange, CancelRange, Refresh example

The following example sets a range for a dataset. The form requires two edit boxes, a data source, a client dataset, a db grid, and a button.

procedure TForm1.FormActivate(Sender: TObject);

begin

  ClientDataSet1.FileName := 'Customer.db';

  ClientDataSet1.Active := True;

  ClientDataSet1.IndexName := 'ByCompany';

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  if Button1.Caption = '&Apply Range' then

  begin

    ClientDataSet1.SetRange([Edit1.Text],[Edit2.Text]);

    Button1.Caption := '&Drop Range';

  end

  else

  begin

    ClientDataSet1.CancelRange;

    ClientDataSet1.Refresh;

    Button1.Caption := '&Apply Range';

  end;

end;


FindNearest example
 CLX 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 client dataset. As the user types in the edit box, the cursor of the grid moves to the nearest match in the dataset.

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
 CLX 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

  ClientDataSet1.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
 CLX 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
 CLX 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;


OnLogTrace, SaveToFile example
 CLX 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;


 CLX Reference


TDBGridColumns
 CLX Reference

TDBGridColumns

Hierarchy	Properties	Methods 	Using TDBGridColumns	See also

TDBGridColumns represents a container for TColumn objects.

Unit

QDBGrids

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.


 CLX Reference

TDBGridColumns properties

TDBGridColumns	Alphabetically	Legend

In TDBGridColumns

Grid

Items

State

Derived from TCollection

Count

ItemClass


 CLX Reference

TDBGridColumns properties

TDBGridColumns	By object	Legend

Count

Grid

ItemClass

Items

State


TDBGridColumns.Grid
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

 TDBGrid

Hierarchy	Properties	Methods	Events 	Using TDBGrid	See also

TDBGrid displays and manipulates records from a dataset in a tabular grid.

Unit

QDBGrids

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.


 CLX Reference

TDBGrid properties

TDBGrid	Alphabetically	Legend

Derived from TCustomDBGrid

Columns

DataSource

DefaultDrawing

FieldCount

Fields

Options

ReadOnly

SelectedField

SelectedIndex

SelectedRows

TitleFont

Derived from TCustomGrid

BorderStyle

ClientRect

EditorMode

FixedColor

Derived from TCustomControl

Canvas

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ControlCount

Controls

Enabled

Handle

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDBGrid properties

TDBGrid	By object	Legend

Action

Align

Anchors

BorderStyle

BoundsRect

Brush

Canvas

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Columns

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataSource

DefaultDrawing

DesignInfo

DragMode

EditorMode

Enabled

FieldCount

Fields

FixedColor

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Options

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ReadOnly

SelectedField

SelectedIndex

SelectedRows

ShowHint

Showing

TabOrder

TabStop

Tag

TitleFont

Top

Visible

Width


 CLX Reference

TDBGrid events

TDBGrid	Alphabetically	Legend

Derived from TCustomDBGrid

OnCellClick

OnColEnter

OnColExit

OnColumnMoved

OnDrawColumnCell

OnDrawDataCell

OnEditButtonClick

OnTitleClick

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TDBGrid events

TDBGrid	By object	Legend

OnCellClick

OnColEnter

OnColExit

OnColumnMoved

OnDblClick

OnDragDrop

OnDragOver

OnDrawColumnCell

OnDrawDataCell

OnEditButtonClick

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag

OnTitleClick


 CLX Reference

TDBGrid methods

TDBGrid	Alphabetically	Legend

Derived from TCustomDBGrid

Create

DefaultDrawColumnCell

DefaultDrawDataCell

Destroy

ExecuteAction

ShowPopupEditor

UpdateAction

ValidFieldIndex

Derived from TCustomGrid

MouseCoord

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

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


 CLX 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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

MouseCoord

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

ShowPopupEditor

Update

UpdateAction

UpdateControlState

ValidFieldIndex


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomControl

TCustomGrid

TCustomDBGrid

TDBGrid


TDBImage
 CLX 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

QDBCtrls

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 accelerator keys. 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.


 CLX Reference

TDBImage properties

TDBImage	Alphabetically	Legend

In TDBImage

AutoDisplay

BorderStyle

Center

DataField

DataSource

Field

Picture

QuickDraw

ReadOnly

Stretch

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDBImage properties

TDBImage	By object	Legend

Action

Align

Anchors

AutoDisplay

BorderStyle

BoundsRect

Brush

Center

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataField

DataSource

DesignInfo

DragMode

Enabled

Field

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

Picture

PopupMenu

QuickDraw

ReadOnly

ShowHint

Showing

Stretch

TabOrder

TabStop

Tag

Top

Visible

Width


TDBImage.AutoDisplay
 CLX 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
 CLX Reference

TDBImage.BorderStyle

TDBImage	See also

Determines whether the database image control has a border.

property BorderStyle: TControlBorderStyle;

Description

Set BorderStyle to specify whether a single line border should be drawn around the database image control.


TDBImage.Center
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TDBImage.Stretch

TDBImage	See also

Determines whether bitmaps 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.


 CLX Reference

TDBImage events

TDBImage	Alphabetically	Legend

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TDBImage events

TDBImage	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TDBImage methods

TDBImage	Alphabetically	Legend

In TDBImage

CopyToClipboard

Create

CutToClipboard

Destroy

ExecuteAction

LoadPicture

PasteFromClipboard

UpdateAction

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

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


 CLX 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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

LoadPicture

MethodAddress

MethodName

NewInstance

ParentToClient

PasteFromClipboard

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TDBImage.CopyToClipboard
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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

TWidgetControl

TCustomControl

TDBImage


TDBListBox
 CLX 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

QDBCtrls

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.


 CLX Reference

TDBListBox properties

TDBListBox	Alphabetically	Legend

In TDBListBox

DataField

DataSource

Field

Items

ReadOnly

Derived from TCustomListBox

Canvas

ChildHandle

ColumnLayout

Handle

ItemHeight

ItemIndex

RowLayout

Rows

SelCount

Selected

Style

TopIndex

Derived from TFrameControl

BorderStyle

Derived from TWidgetControl

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDBListBox properties

TDBListBox	By object	Legend

Action

Align

Anchors

BorderStyle

BoundsRect

Brush

Canvas

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ColumnLayout

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataField

DataSource

DesignInfo

DragMode

Enabled

Field

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

ItemHeight

ItemIndex

Items

Left

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ReadOnly

RowLayout

Rows

SelCount

Selected

ShowHint

Showing

Style

TabOrder

TabStop

Tag

Top

TopIndex

Visible

Width


TDBListBox.DataField
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TDBListBox events

TDBListBox	Alphabetically	Legend

Derived from TCustomListBox

OnDrawItem

OnMeasureItem

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp


 CLX Reference

TDBListBox events

TDBListBox	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDrawItem

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMeasureItem

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TDBListBox methods

TDBListBox	Alphabetically	Legend

In TDBListBox

Create

Destroy

ExecuteAction

UpdateAction

Derived from TCustomListBox

Clear

ClearSelection

ItemAtPos

ItemRect

ItemVisible

MakeCurrentVisible

Sort

Update

VisibleItemCount

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

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


 CLX Reference

TDBListBox methods

TDBListBox	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

ItemAtPos

ItemRect

ItemVisible

MakeCurrentVisible

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Sort

Update

UpdateAction

UpdateControlState

VisibleItemCount


TDBListBox.Create
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomListBox

TDBListBox


TDBLookupComboBox
 CLX 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

QDBCtrls

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.


 CLX Reference

TDBLookupComboBox properties

TDBLookupComboBox	Alphabetically	Legend

In TDBLookupComboBox

DropDownAlign

DropDownRows

DropDownWidth

ListVisible

Text

Derived from TDBLookupControl

DataField

DataSource

Field

KeyField

KeyValue

ListField

ListFieldIndex

ListSource

ReadOnly

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDBLookupComboBox properties

TDBLookupComboBox	By object	Legend

Action

Align

Anchors

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataField

DataSource

DesignInfo

DragMode

DropDownAlign

DropDownRows

DropDownWidth

Enabled

Field

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

KeyField

KeyValue

Left

ListField

ListFieldIndex

ListSource

ListVisible

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ReadOnly

ShowHint

Showing

TabOrder

TabStop

Tag

Text

Top

Visible

Width


TDBLookupComboBox.DropDownAlign
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TDBLookupComboBox events

TDBLookupComboBox	Alphabetically	Legend

In TDBLookupComboBox

OnCloseUp

OnDropDown

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TDBLookupComboBox events

TDBLookupComboBox	By object	Legend

OnClick

OnCloseUp

OnContextPopup

OnDragDrop

OnDragOver

OnDropDown

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


TDBLookupComboBox.OnCloseUp
 CLX 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
 CLX 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;


 CLX Reference

TDBLookupComboBox methods

TDBLookupComboBox	Alphabetically	Legend

In TDBLookupComboBox

CloseUp

Create

DropDown

ExecuteAction

SetBounds

UpdateAction

Derived from TDBLookupControl

Destroy

Derived from TCustomControl

Invalidate

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

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


 CLX 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

DragDrop

Dragging

DropDown

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TDBLookupComboBox.CloseUp
 CLX 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
 CLX 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
 CLX 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
 CLX 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.SetBounds
 CLX Reference

TDBLookupComboBox.SetBounds

TDBLookupComboBox	See also

Sets the Left, Top, Width, and Height properties all at once.

procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;

Description

Use SetBounds to change all of the combo box’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. Note that the AHeight parameter is ignored: SetBounds always bases the height for the combo box on the current Font.

Note:	Calling SetBounds does not necessarily result in the Left, Top, and Width properties changing to the specified values. Before the properties are changed, the Constraints property may limit the changes.


TDBLookupComboBox.UpdateAction
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomControl

TDBLookupControl

TDBLookupComboBox


TDBLookupControl
 CLX 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

QDBCtrls

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.


 CLX Reference

TDBLookupControl properties

TDBLookupControl	Alphabetically	Legend

In TDBLookupControl

DataField

DataSource

Field

KeyField

KeyValue

ListActive

ListField

ListFieldIndex

ListFields

ListLink

ListSource

ReadOnly

SearchText

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDBLookupControl properties

TDBLookupControl	By object	Legend

Action

Align

Anchors

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataField

DataSource

DesignInfo

Enabled

Field

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

KeyField

KeyValue

Left

ListActive

ListField

ListFieldIndex

ListFields

ListLink

ListSource

Name

Owner

Parent

ParentColor

ParentWidget

ReadOnly

SearchText

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width


TDBLookupControl.DataField
 CLX 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.DataSource
 CLX 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
 CLX 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.KeyField
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.ReadOnly
 CLX 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
 CLX 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.


 CLX Reference

TDBLookupControl methods

TDBLookupControl	Alphabetically	Legend

In TDBLookupControl

CanModify

Create

Destroy

DoEnter

DoExit

ExecuteAction

GetTextHeight

KeyValueChanged

ListLinkDataChanged

LocateKey

Notification

ProcessSearchKey

SelectKeyValue

UpdateAction

UpdateDataFields

UpdateListFields

Derived from TCustomControl

Invalidate

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

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


 CLX 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

DoEnter

DoExit

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextHeight

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

KeyValueChanged

ListLinkDataChanged

LocateKey

MethodAddress

MethodName

NewInstance

Notification

ParentToClient

ProcessSearchKey

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectKeyValue

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState

UpdateDataFields

UpdateListFields


TDBLookupControl.Create
 CLX 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
 CLX 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.DoEnter
 CLX Reference

TDBLookupControl.DoEnter

TDBLookupControl	See also

Initializes the SearchText property and generates an OnEnter event.

procedure DoEnter; override;

Description

Applications do not call the protected DoEnter method. It is called automatically when the control receives input focus.

In TDBLookupControl, DoEnter initializes the protected SearchText property to an empty string and generates an OnEnter event.


TDBLookupControl.DoExit
 CLX Reference

TDBLookupControl.DoExit

TDBLookupControl	See also

Generates an OnExit event.

procedure DoExit; override;

Description

Applications do not call the protected DoExit method. It is called automatically when the control loses input focus.

In TDBLookupControl, DoExit generates an OnExit event and then forces the control to repaint.


TDBLookupControl.CanModify
 CLX 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
 CLX 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.GetTextHeight
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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

TWidgetControl

TCustomControl

TDBLookupControl


TDBLookupListBox
 CLX 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

QDBCtrls

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.


 CLX Reference

TDBLookupListBox properties

TDBLookupListBox	Alphabetically	Legend

In TDBLookupListBox

BorderStyle

RowCount

SelectedItem

Derived from TDBLookupControl

DataField

DataSource

Field

KeyField

KeyValue

ListField

ListFieldIndex

ListSource

ReadOnly

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDBLookupListBox properties

TDBLookupListBox	By object	Legend

Action

Align

Anchors

BorderStyle

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataField

DataSource

DesignInfo

DragMode

Enabled

Field

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

KeyField

KeyValue

Left

ListField

ListFieldIndex

ListSource

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ReadOnly

RowCount

SelectedItem

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width


TDBLookupListBox.BorderStyle
 CLX Reference

TDBLookupListBox.BorderStyle

TDBLookupListBox	See also

Determines whether the lookup list box has a border.

property BorderStyle: TControlBorderStyle;

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
 CLX 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
 CLX 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;


 CLX Reference

TDBLookupListBox events

TDBLookupListBox	Alphabetically	Legend

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TDBLookupListBox events

TDBLookupListBox	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TDBLookupListBox methods

TDBLookupListBox	Alphabetically	Legend

In TDBLookupListBox

Create

Destroy

ExecuteAction

UpdateAction

Derived from TCustomControl

Invalidate

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

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


 CLX 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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TDBLookupListBox.Create
 CLX 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.Destroy
 CLX Reference

TDBLookupListBox.Destroy

TDBLookupListBox	See also

Frees the memory associated with the TDBLookupListBox object.

destructor Destroy; override;

Description

Do not use Destroy to free a DB lookup list box. Instead, use the Free method, that checks whether the listbox is nil before calling Destroy.


TDBLookupListBox.ExecuteAction
 CLX 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
 CLX 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

TWidgetControl

TCustomControl

TDBLookupControl

TDBLookupListBox


TLoginDialog
 CLX 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 database tables. However, TLoginDialog can also be used as a base object for other types of login dialog boxes.


 CLX Reference

TLoginDialog properties

TLoginDialog	Alphabetically	Legend

Derived from TCustomForm

Active

ActiveControl

BorderIcons

BorderStyle

Canvas

ClientHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

DesignerHook

DropTarget

FocusedControl

FormState

FormStyle

Icon

KeyPreview

MDIChildCount

MDIChildren

Menu

ModalResult

Parent

ParentWidget

PixelsPerInch

Position

Scaled

Visible

WindowState

Derived from TScrollingWidget

AutoScroll

ChildHandle

Handle

HorzScrollBar

VertScrollBar

Derived from TWidgetControl

Bitmap

Brush

ControlCount

Controls

Enabled

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

Caption

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentFont

PopupMenu

ShowHint

Top

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TLoginDialog properties

TLoginDialog	By object	Legend

Action

Active

ActiveControl

Align

Anchors

AutoScroll

Bitmap

BorderIcons

BorderStyle

BoundsRect

Brush

Canvas

Caption

ChildHandle

ClientHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignerHook

DesignInfo

DragMode

DropTarget

Enabled

FocusedControl

Font

FormState

FormStyle

Handle

Height

HelpContext

HelpContext

HelpKeyword

HelpType

Hint

HorzScrollBar

Icon

KeyPreview

Left

MDIChildCount

MDIChildren

Menu

ModalResult

Name

Owner

Parent

ParentFont

ParentWidget

PixelsPerInch

PopupMenu

Position

Scaled

ShowHint

Showing

TabOrder

TabStop

Tag

Top

VertScrollBar

Visible

Width

WindowState


 CLX Reference

TLoginDialog events

TLoginDialog	Alphabetically	Legend

Derived from TCustomForm

OnActivate

OnClose

OnCloseQuery

OnCreate

OnDeactivate

OnDestroy

OnHelp

OnHide

OnLoaded

OnPaint

OnShow

Derived from TWidgetControl

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize


 CLX Reference

TLoginDialog events

TLoginDialog	By object	Legend

OnActivate

OnClick

OnClose

OnCloseQuery

OnContextPopup

OnCreate

OnDblClick

OnDeactivate

OnDestroy

OnDragDrop

OnDragOver

OnHelp

OnHide

OnKeyDown

OnKeyPress

OnKeyUp

OnLoaded

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnPaint

OnResize

OnShow


 CLX Reference

TLoginDialog methods

TLoginDialog	Alphabetically	Legend

In TLoginDialog

FormShow

Derived from TForm

Cascade

Next

Previous

Tile

Derived from TCustomForm

AfterConstruction

BeforeDestruction

Close

CloseQuery

Create

CreateNew

DefocusControl

Destroy

FocusControl

Hide

IsShortCut

Release

SetFocus

SetFocusedControl

Show

ShowModal

Derived from TScrollingWidget

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

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


 CLX Reference

TLoginDialog methods

TLoginDialog	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Cascade

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Close

CloseQuery

ContainsControl

ContentsRect

ControlAtPos

Create

CreateNew

CreateParented

CreateParentedControl

DefocusControl

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

DragDrop

Dragging

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

FocusControl

Focused

FormShow

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

IsShortCut

MethodAddress

MethodName

NewInstance

Next

ParentToClient

Previous

Realign

ReferenceInterface

Refresh

Release

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendToBack

SetBounds

SetFocus

SetFocusedControl

SetSubComponent

Show

ShowModal

Tile

Update

UpdateAction

UpdateControlState


TLoginDialog.FormShow
 CLX 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

TWidgetControl

TFrameControl

TScrollingWidget

TCustomForm

TForm

TLoginDialog


TDBMemo
 CLX 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

QDBCtrls

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.


 CLX Reference

TDBMemo properties

TDBMemo	Alphabetically	Legend

In TDBMemo

AutoDisplay

DataField

DataSource

Field

ReadOnly

Derived from TCustomMemo

Alignment

CaretPos

Handle

MaxLength

Modified

ScrollBars

Selection

SelLength

SelStart

SelText

Text

TextWidth

WantTabs

WordWrap

Derived from TFrameControl

BorderStyle

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDBMemo properties

TDBMemo	By object	Legend

Action

Align

Alignment

Anchors

AutoDisplay

BorderStyle

BoundsRect

Brush

CaretPos

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataField

DataSource

DesignInfo

DragMode

Enabled

Field

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

MaxLength

Modified

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ReadOnly

ScrollBars

Selection

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

Text

TextWidth

Top

Visible

WantTabs

Width

WordWrap


TDBMemo.AutoDisplay
 CLX 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.

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
 CLX 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
 CLX 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
 CLX 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.


TDBMemo.ReadOnly
 CLX 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.


 CLX Reference

TDBMemo events

TDBMemo	Alphabetically	Legend

Derived from TCustomMemo

OnChange

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TDBMemo events

TDBMemo	By object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TDBMemo methods

TDBMemo	Alphabetically	Legend

In TDBMemo

Create

Destroy

ExecuteAction

LoadMemo

UpdateAction

Derived from TCustomMemo

Append

AtEOF

Clear

ClearSelection

CopyToClipboard

CutToClipboard

GetTextBuf

GetTextLen

HasSelection

Insert

PasteFromClipboard

SelectAll

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

MouseCapture

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

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


 CLX Reference

TDBMemo methods

TDBMemo	By object	Legend

AfterConstruction

Append

Assign

AtEOF

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

HasSelection

Hide

InheritsFrom

InitiateAction

InitInstance

Insert

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

LoadMemo

MethodAddress

MethodName

MouseCapture

NewInstance

ParentToClient

PasteFromClipboard

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TDBMemo.Create
 CLX 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
 CLX 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
 CLX 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.LoadMemo
 CLX 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.UpdateAction
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomMemo

TDBMemo


TDBNavigator
 CLX 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

QDBCtrls

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.


 CLX Reference

TDBNavigator properties

TDBNavigator	Alphabetically	Legend

In TDBNavigator

ConfirmDelete

DataSource

Flat

Hints

VisibleButtons

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DragMode

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDBNavigator properties

TDBNavigator	By object	Legend

Action

Align

Anchors

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConfirmDelete

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataSource

DesignInfo

DragMode

Enabled

Flat

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Hints

Left

Name

Owner

Parent

ParentShowHint

ParentWidget

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

VisibleButtons

Width


TDBNavigator.ConfirmDelete
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


 CLX Reference

TDBNavigator events

TDBNavigator	Alphabetically	Legend

In TDBNavigator

BeforeAction

OnClick

Derived from TWidgetControl

OnEnter

OnExit

Derived from TControl

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnResize

OnStartDrag


 CLX Reference

TDBNavigator events

TDBNavigator	By object	Legend

BeforeAction

OnClick

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnResize

OnStartDrag


TDBNavigator.BeforeAction
 CLX 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
 CLX 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.


 CLX Reference

TDBNavigator methods

TDBNavigator	Alphabetically	Legend

In TDBNavigator

BtnClick

Create

Destroy

SetBounds

Derived from TCustomControl

Invalidate

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX 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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TDBNavigator.BtnClick
 CLX 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
 CLX 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
 CLX 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
 CLX 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

TWidgetControl

TCustomControl

TCustomPanel

TDBNavigator


TDBRadioGroup
 CLX Reference

 TDBRadioGroup

Hierarchy	Properties	Methods	Events 	Using TDBRadioGroup	See also

TDBRadioGroup represents a group of radio buttons connected to a database.

Unit

QDBCtrls

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.


 CLX Reference

TDBRadioGroup properties

TDBRadioGroup	Alphabetically	Legend

In TDBRadioGroup

DataField

DataSource

Field

Items

ReadOnly

Value

Values

Derived from TCustomRadioGroup

Columns

Handle

ItemIndex

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDBRadioGroup properties

TDBRadioGroup	By object	Legend

Action

Align

Anchors

BoundsRect

Brush

Caption

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Columns

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataField

DataSource

DesignInfo

DragMode

Enabled

Field

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

ItemIndex

Items

Left

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ReadOnly

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Value

Values

Visible

Width


TDBRadioGroup.DataField
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TDBRadioGroup events

TDBRadioGroup	Alphabetically	Legend

In TDBRadioGroup

OnChange

Derived from TWidgetControl

OnEnter

OnExit

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnStartDrag


 CLX Reference

TDBRadioGroup events

TDBRadioGroup	By object	Legend

OnChange

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnStartDrag


TDBRadioGroup.OnChange
 CLX 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.


 CLX Reference

TDBRadioGroup methods

TDBRadioGroup	Alphabetically	Legend

In TDBRadioGroup

Create

Destroy

ExecuteAction

UpdateAction

Derived from TCustomRadioGroup

SetFocus

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

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


 CLX Reference

TDBRadioGroup methods

TDBRadioGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TDBRadioGroup.Create
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomGroupBox

TCustomRadioGroup

TDBRadioGroup


TDBText
 CLX 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

QDBCtrls

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) instead to conserve system resources.


 CLX Reference

TDBText properties

TDBText	Alphabetically	Legend

In TDBText

AutoSize

DataField

DataSource

Field

Derived from TCustomLabel

Alignment

Handle

Transparent

WordWrap

Derived from TWidgetControl

Bitmap

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDBText properties

TDBText	By object	Legend

Action

Align

Alignment

Anchors

AutoSize

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataField

DataSource

DesignInfo

DragMode

Enabled

Field

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Transparent

Visible

Width

WordWrap


TDBText.AutoSize
 CLX 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
 CLX 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
 CLX 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
 CLX 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';


 CLX Reference

TDBText events

TDBText	Alphabetically	Legend

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TDBText events

TDBText	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TDBText methods

TDBText	Alphabetically	Legend

In TDBText

Create

Destroy

ExecuteAction

UpdateAction

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

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


 CLX Reference

TDBText methods

TDBText	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TDBText.Create
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomLabel

TDBText


DBResult type
 CLX Reference

DBResult type

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TBcd type
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 client dataset) with methods on another type of dataset (for example, a custom dataset).


TConnectChangeEvent type
 CLX 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
 CLX 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
 CLX 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
 CLX 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	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.


TFieldClass type
 CLX 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
 CLX 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
 CLX 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, 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
 CLX 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
 CLX 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
 CLX 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.

See the vendor-supplied documentation for the particular database system for details on what index options are applicable.


TLocaleCode type
 CLX 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 following table lists the possible values:

LocaleCode	Linux locale	Sort order

1024	Used to specify locales that do not have a code.

1025	ar or ps	Arabic (Afghanistan) or Pashto

1026	bg	Bulgarian

1027	ca	Catalan

1028	zh	Chinese (Taiwan)

1029	cs	Czech

1030	da	Danish

1031	de	German (Germany)

1032	el	Greek

1033	en	English (US)

1034	es	Spanish (Cuba & Andora)

1035	fi	Finnish

1036	fr	French (France)

1037	he, iw	Hebrew

1038	hu	Hungarian

1039	is	Icelandic

1040	it	Italian (Italy)

1041	ja	Japanese

1042	ko	Korean

1043	nl	Dutch (Netherlands)

1044	nb	Norwegian (Norway)

1045	pl	Polish

1046	pt	Portuguese (Brazil)

1047	rm	Rhaeto-Romance

1048	ro	Romanian (Romania)

1049	ru	Russian (Russia & Ukraine)

1050	hr	Serbo-Croatian (Croatia & Slovakia)

1051	sk	Slovak

1052	sq	Albanian

1053	sv	Swedish (Sweden)

1054	th	Thai

1055	tr	Turkish

1056	ur	Urdu (Pakistan)

1057	in	Indonesian

1058	uk	Ukrainian

1059	be	Byelorussian

1060	sl	Slovenian

1061	et	Estonian

1062	lv	Latvian

1063	lt	Lithuanian

1065	fa	Persian

1066	vi	Vietnamese

1067	hy	Armenian

1068	az	Azerbaijani

1069	eu	Basque

1071	mk	Macedonian

1073	ts	Tsonga

1074	tn	Setswana

1076	xh	Xhosa

1077	zu	Zulu

1078	af	Afrikaans

1079	ka	Georgian

1080	fo	Faeroese

1081	hi	Hindi

1082	mt	Maltese

1084	gd	Scots Gaelic

1085	ji	Yiddish

1086	ms	Malay (Malaysia)

1089	sw	Swahili

1091	uz	Uzbek

1092	tt	Tatar

1093	bn	Bengali

1094	pa	Punjabi

1095	gu	Gujarati

1096	or	Oriya

1097	ta	Tamil

1098	te	Telugu

1099	kn	Kannada

1100	ml	Malayalam

1101	as	Assanese

1102	mr	Marathi

1103	sa	Sanskrit

1111	kok	Korean

1113	sd	Sindhi

1120	ks	Kashmiri

1121	ne	Nepali

2049	ar_IQ	Arabic (Iraq)

2052	zh_CN	Chinese (China)

2055	de_CH	German (Switzerland)

2057	en_UK	English (UK)

2058	es_MX	Spanish (Mexico)

2060	fr_BE	French (Belgium)

2064	it_CH	Italian (Switzerland)

2067	nl_BE	Dutch (Belgium)

2068	nn_NO	Nowegian (Norway)

2070	pt_PT	Protuguese (Portugal)

2072	ro_MO	Romanian (Macau)

2073	ru_MO	Russian (Macau)

2074	sh_YU	Serbo-Croatian (Yugoslavia)

2077	sv_FI	Swedish (Finland)

2080	ur_IN	Urdu (India)

2092	az@latin	Azerbaijani

2110	ms_BN	Malay (Brunei Darussalam)

2115	uz@cyrillic	Uzbek

2144	ks_IN	Kashmiri (India)

2145	ne_IN	Nepali (India)

3073	ar_EG	Arabic (Egypt)

3076	zh_HK	Chinese (Hong Kong)

3079	de_AT	German (Austria)

3081	en_AU, en_BE, en_BW	English (Australia, Belgium, or Botswana)

3082	es_ES	Spanish (Spain)

3084	fr_CA	French (Canada)

3098	sr_YU	Serbian (Yugoslavia)

4097	ar_LY	Arabic (Libya)

4100	zh_SG	Chinese (Singapore)

4103	de_LU	German (Luxembourg)

4105	en_CA	English (Canada)

4106	es_GT	Spanish (Guatemala)

4108	fr_CH	French (Switzerland)

5121	ar_DZ	Arabic (Algeria)

5124	zh_MO	Chinese (Macau)

5127	de_LI	German (Liechtenstein)

5129	en_SG, en_NZ	English (Singapore or New Zealand)

5130	es_CR	Spanish (Costa Rica)

5132	fr_LU	French (Luxembourg)

6145	ar_MA	Arabic (Morocco)

6153	en_IE	English (Ireland)

6154	es_PA	Spanish (Panama)

6156	fr_MC	French (Monaco)

7169	ar_TN	Arabic (Tunisia)

7177	en_ZA	English (South Africa)

7178	es_DO	Spanish (Dominican Republic)

8193	ar_OM	Arabic (Oman)

8201	en_JM	English (Jamaica)

8202	es_VE	Spanish (Venezuela)

9217	ar_YE	Arabic (Yemen)

9225	en_AS	English (American Samoa)

9226	es_CO	Spanish (Colombia)

10241	ar_SY	Arabic (Syria)

10249	en_BZ	English (Belize)

10250	es_PE	Spanish (Peru)

11265	ar_JO	Arabic (Jordan)

11273	en_TT	English (Trinidad & Tobago)

11274	es_AR	Spanish (Argentina)

12289	ar_LB	Arabic (Lebanon)

12297	en_ZW	English (Zimbabwe)

12298	es_EC	Spanish (Ecuador)

13313	ar_KW	Arabic (Kuwait)

13321	en_PH	English (Philippines)

13322	es_CL	Spanish (Chile)

14337	ar_AE	Arabic (United Arab Emirates)

14346	es_UY	Spanish (Uruguay)

15361	ar_BH	Arabic (Bahrain)

15370	es_PY	Spanish (Paraguay)

16385	ar_QA	Arabic (Qatar)

16394	es_BO	Spanish (Bolivia)

17418	es_SV	Spanish (El Salvador)

18442	es_HN	Spanish (Honduras)

19466	es_NI	Spanish (Nicaragua)

20490	es_PR	Spanish (Puerto Rico)


TLocateOptions type
 CLX 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.'


TNavigateBtn type
 CLX Reference

TNavigateBtn type

TNavigateBtn defines values identifying different possible buttons on a TDBNavigator object.

Unit

QDBCtrls

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TUpdateKind type
 CLX Reference

TUpdateKind type

TUpdateKind defines the values for the UpdateKind parameter of OnUpdateError event handlers.

Unit

DB

type TUpdateKind = (ukModify, ukInsert, ukDelete);

Description

The TUpdateKind type defines the possible values for the UpdateKind parameter of OnUpdateError event handlers, as described in the following table:

Value	Description

ukModify	The update to the record is a modification to the record's contents.

ukInsert	The update is the insertion of a new record.

ukDelete	The update is the deletion of a record.


TUpdateMode type
 CLX 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
 CLX 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
 CLX 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. TClientDataSet objects use these definition objects to specify the attributes of a database entity before creating the underlying 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.


 CLX Reference

TDefCollection properties

TDefCollection	Alphabetically	Legend

In TDefCollection

Dataset

Updated

Derived from TCollection

Count

ItemClass

Items


 CLX Reference

TDefCollection properties

TDefCollection	By object	Legend

Count

Dataset

ItemClass

Items

Updated


TDefCollection.Dataset
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TDetailDataLink
 CLX 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 client datasets.

TSQLDataLink, which is used by unidirectional datasets.


 CLX Reference

TDetailDataLink properties

TDetailDataLink	Alphabetically	Legend

In TDetailDataLink

DetailDataSet

Derived from TDataLink

Active

ActiveRecord

BOF

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 CLX Reference

TDetailDataLink properties

TDetailDataLink	By object	Legend

Active

ActiveRecord

BOF

BufferCount

DataSet

DataSource

DataSourceFixed

DetailDataSet

Editing

Eof

ReadOnly

RecordCount


TDetailDataLink.DetailDataSet
 CLX 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.


 CLX 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


 CLX 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
 CLX 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


TDataSetCancel
 CLX 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

QDBActns

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.


 CLX Reference

TDataSetCancel properties

TDataSetCancel	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDataSetCancel properties

TDataSetCancel	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TDataSetCancel events

TDataSetCancel	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TDataSetCancel events

TDataSetCancel	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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


TDataSetDelete
 CLX Reference

TDataSetDelete

Hierarchy	Properties	Methods	Events	Using TDataSetDelete	See also

TDataSetDelete deletes the current record, making the next record current.

Unit

QDBActns

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.


 CLX Reference

TDataSetDelete properties

TDataSetDelete	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDataSetDelete properties

TDataSetDelete	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TDataSetDelete events

TDataSetDelete	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TDataSetDelete events

TDataSetDelete	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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


TDataSetEdit
 CLX Reference

TDataSetEdit

Hierarchy	Properties	Methods	Events	Using TDataSetEdit	See also

TDataSetEdit puts a target dataset into edit mode.

Unit

QDBActns

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.


 CLX Reference

TDataSetEdit properties

TDataSetEdit	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDataSetEdit properties

TDataSetEdit	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TDataSetEdit events

TDataSetEdit	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TDataSetEdit events

TDataSetEdit	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX Reference

TDataSetLast

Hierarchy	Properties	Methods	Events	Using TDataSetLast	See also

TDataSetLast moves a target dataset to its last record.

Unit

QDBActns

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.


 CLX Reference

TDataSetLast properties

TDataSetLast	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDataSetLast properties

TDataSetLast	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TDataSetLast events

TDataSetLast	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TDataSetLast events

TDataSetLast	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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


TDataSetNext
 CLX Reference

TDataSetNext

Hierarchy	Properties	Methods	Events	Using TDataSetNext	See also

TDataSetNext moves a target dataset to its next record.

Unit

QDBActns

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.


 CLX Reference

TDataSetNext properties

TDataSetNext	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDataSetNext properties

TDataSetNext	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TDataSetNext events

TDataSetNext	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TDataSetNext events

TDataSetNext	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX Reference

TDataSetPost

Hierarchy	Properties	Methods	Events	Using TDataSetPost	See also

TDataSetPost posts the edits in the current record of a target dataset.

Unit

QDBActns

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.


 CLX Reference

TDataSetPost properties

TDataSetPost	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDataSetPost properties

TDataSetPost	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TDataSetPost events

TDataSetPost	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TDataSetPost events

TDataSetPost	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX Reference

TDataSetFirst

Hierarchy	Properties	Methods	Events	Using TDataSetFirst	See also

TDataSetFirst moves a target dataset to its first record.

Unit

QDBActns

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.


 CLX Reference

TDataSetFirst properties

TDataSetFirst	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDataSetFirst properties

TDataSetFirst	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TDataSetFirst events

TDataSetFirst	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TDataSetFirst events

TDataSetFirst	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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


TDataSetField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TDataSetField properties

TDataSetField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TDataSetField.CanModify
 CLX 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
 CLX 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
 CLX Reference

TDataSetField.IncludeObjectField

TDataSetField

Reserved for future use.

property IncludeObjectField: Boolean;

Description

The IncludeObjectField property is not currently implemented.


TDataSetField.NestedDataSet
 CLX 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.


 CLX Reference

TDataSetField events

TDataSetField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TDataSetField events

TDataSetField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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
 CLX Reference

TDataSetInsert

Hierarchy	Properties	Methods	Events	Using TDataSetInsert	See also

TDataSetInsert inserts a new record into a target dataset.

Unit

QDBActns

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.


 CLX Reference

TDataSetInsert properties

TDataSetInsert	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDataSetInsert properties

TDataSetInsert	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TDataSetInsert events

TDataSetInsert	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TDataSetInsert events

TDataSetInsert	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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


TDataSetRefresh
 CLX Reference

TDataSetRefresh

Hierarchy	Properties	Methods	Events	Using TDataSetRefresh	See also

TDataSetRefresh refreshes the records in a target dataset.

Unit

QDBActns

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.


 CLX Reference

TDataSetRefresh properties

TDataSetRefresh	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDataSetRefresh properties

TDataSetRefresh	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TDataSetRefresh events

TDataSetRefresh	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TDataSetRefresh events

TDataSetRefresh	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TDataSetResolver properties

TDataSetResolver	Alphabetically	Legend

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TDataSetResolver properties

TDataSetResolver	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TDataSetResolver methods

TDataSetResolver	Alphabetically	Legend

In TDataSetResolver

Create

Derived from TCustomResolver

Destroy

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TDataSetResolver.Create
 CLX 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


EBcdException
 CLX 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.


 CLX Reference

EBcdException properties

EBcdException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EBcdException properties

EBcdException	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX 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.


 CLX Reference

EBcdOverflowException properties

EBcdOverflowException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EBcdOverflowException properties

EBcdOverflowException	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


ECanvasException
 CLX Reference

ECanvasException

Hierarchy	Properties	Methods	See also

ECanvasException is the exception class for canvas objects.

Unit

QControls

Description

ECanvasException is raised when a control tries to initialize a canvas while it is already in the middle of a paint operation.


 CLX Reference

ECanvasException Properties

ECanvasException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

ECanvasException Properties

ECanvasException	By Object	Legend

HelpContext

Message


 CLX Reference

ECanvasException Methods

ECanvasException	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


 CLX Reference

ECanvasException Methods

ECanvasException	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

ECanvasException


EDSWriter
 CLX 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.


 CLX Reference

EDSWriter properties

EDSWriter	Alphabetically	Legend

In EDSWriter

ErrorCode

Derived from Exception

HelpContext

Message


 CLX Reference

EDSWriter properties

EDSWriter	By object	Legend

ErrorCode

HelpContext

Message


EDSWriter.ErrorCode
 CLX 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.


 CLX 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


 CLX 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
 CLX 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


EReconcileError
 CLX 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.


 CLX Reference

EReconcileError properties

EReconcileError	Alphabetically	Legend

In EReconcileError

Context

PreviousError

Derived from EDBClient

ErrorCode

Derived from Exception

HelpContext

Message


 CLX Reference

EReconcileError properties

EReconcileError	By object	Legend

Context

ErrorCode

HelpContext

Message

PreviousError


EReconcileError.Context
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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 (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
 CLX 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

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.


 CLX Reference

ESocketError properties

ESocketError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

ESocketError properties

ESocketError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX 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.


 CLX Reference

EUpdateError properties

EUpdateError	Alphabetically	Legend

In EUpdateError

Context

ErrorCode

OriginalException

PreviousError

Derived from Exception

HelpContext

Message


 CLX Reference

EUpdateError properties

EUpdateError	By object	Legend

Context

ErrorCode

HelpContext

Message

OriginalException

PreviousError


EUpdateError.Context
 CLX 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
 CLX 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 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:	DBExpress does not return error codes. This property merely provides a mechanism for using custom data-access components that generate error codes rather than exceptions.

Note:	If ErrorCode is 0, use the OriginalException property, which provides access to the exception that was caught.


EUpdateError.OriginalException
 CLX 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.


EUpdateError.PreviousError
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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


TField
 CLX 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


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TField properties

TField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TField.Alignment
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TField.AttributeSet

TField

Reserved for future use.

property AttributeSet: String;

Description

The AttributeSet property is only implemented for Windows applications, which can use the data dictionary.


TField.AutoGenerateValue
 CLX Reference

TField.AutoGenerateValue

TField

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 applying updates. 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).

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
 CLX 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.


TField.CanModify
 CLX 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
 CLX 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
 CLX 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
 CLX 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 environment settings.


TField.DataSet
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TField.EditMask

TField	See also

Contains a mask that restricts the data that can be entered into a data field.

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. Use the OnValidate event instead to validate the entire input, just before it is posted.

Setting EditMask to an empty string removes the mask.

Note:	For a description of the format required by EditMask, see the TEditMask type.


TField.EditMaskPtr
 CLX Reference

TField.EditMaskPtr

TField	See also

Provides read-only access to the EditMask property.

property EditMaskPtr: string;

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.

Note:	For a description of the format required by EditMask, see the TEditMask type.


TField.FieldKind
 CLX 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 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
 CLX 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
 CLX 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.

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
 CLX 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
 CLX 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
 CLX 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 when updates are applied.

Note:	On Linux, Delphi does not provide any mechanism for importing server constraints. However, client datasets can receive imported constraints in data packets from an application server running on another platform.


TField.Index
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TField.Lookup

TField	See also

Determines whether the field is specified as a lookup field.

property Lookup: Boolean;

Description

Lookup indicates whether FieldKind is fkLookup. When FieldKind is fkLookup, Lookup is True. When FieldKind is any other value, Lookup is False. Changing Lookup to False implicitly sets FieldKind to fkData. Note that lookup fields do not work if the field is in a unidirectional dataset.

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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, provider components generate an OnUpdateError event, 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 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.


TField.Offset
 CLX 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
 CLX 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.


TField.Origin
 CLX Reference

TField.Origin

TField	See also

Reserved for future use.

property Origin: String;

Description

The Origin property is only implemented for BDE-enabled datasets, which appear only in the Windows product.


TField.ParentField
 CLX 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
 CLX 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
 CLX 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
 CLX 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 apply 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TField events

TField	Alphabetically	Legend

In TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TField events

TField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


TField.OnChange
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 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.


 CLX 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


 CLX Reference

TFieldDef properties

TFieldDef	By object	Legend

Attributes

ChildDefs

Collection

DataType

DisplayName

FieldClass

FieldNo

ID

Index

InternalCalcField

Name

ParentDef

Precision

Required

Size


TFieldDef.Attributes
 CLX 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.

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 and stored in the dataset like data fields.

InternalCalcField is a read-only property.


TFieldDef.ParentDef
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TFieldDefs
 CLX 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.

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.


 CLX Reference

TFieldDefs properties

TFieldDefs	Alphabetically	Legend

In TFieldDefs

HiddenFields

Items

ParentDef

Derived from TDefCollection

DataSet

Updated

Derived from TCollection

Count

ItemClass


 CLX Reference

TFieldDefs properties

TFieldDefs	By object	Legend

Count

DataSet

HiddenFields

ItemClass

Items

ParentDef

Updated


TFieldDefs.HiddenFields
 CLX 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

Providers 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
 CLX 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 := ClientDataSet1.FieldDefs.Items[0].DisplayName;


TFieldDefs.ParentDef
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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. 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 CreateDataSet method. It cannot be used to add fields to an already-existing table.


TFieldDefs.Create
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX Reference

TFieldList properties

TFieldList	By object	Legend

Capacity

CommaText

Count

DataSet

Duplicates

Fields

Names

Objects

Sorted

Strings

StringsAdapter

Text

Values


TFieldList.Fields
 CLX 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.


 CLX Reference

TFieldList events

TFieldList	Alphabetically	Legend

Derived from TStringList

OnChange

OnChanging


 CLX Reference

TFieldList events

TFieldList	By object	Legend

OnChange

OnChanging


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TFields properties

TFields	Alphabetically	Legend

In TFields

Count

DataSet

Fields


 CLX Reference

TFields properties

TFields	By object	Legend

Count

DataSet

Fields


TFields.Count
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TFlatList
 CLX 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.


 CLX 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


 CLX Reference

TFlatList properties

TFlatList	By object	Legend

Capacity

CommaText

Count

DataSet

Duplicates

Names

Objects

Sorted

StringsAdapter

Strings

Text

Values


TFlatList.Count
 CLX 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
 CLX 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.


 CLX Reference

TFlatList events

TFlatList	Alphabetically	Legend

Derived from TStringList

OnChange

OnChanging


 CLX Reference

TFlatList events

TFlatList	By object	Legend

OnChange

OnChanging


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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

QDBCtrls

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 TWidgetControl.

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.


 CLX 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


 CLX Reference

TFieldDataLink properties

TFieldDataLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

CanModify

Control

DataSet

DataSource

DataSourceFixed

Editing

Eof

Field

FieldName

ReadOnly

RecordCount


TFieldDataLink.CanModify
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TFieldDataLink events

TFieldDataLink	Alphabetically	Legend

In TFieldDataLink

OnActiveChange

OnDataChange

OnEditingChange

OnUpdateData


 CLX Reference

TFieldDataLink events

TFieldDataLink	By object	Legend

OnActiveChange

OnDataChange

OnEditingChange

OnUpdateData


TFieldDataLink.OnActiveChange
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TFieldDefList
 CLX 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.


 CLX 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


 CLX Reference

TFieldDefList properties

TFieldDefList	By object	Legend

Capacity

CommaText

Count

DataSet

Duplicates

FieldDefs

Names

Objects

Sorted

StringsAdapter

Strings

Text

Updated

Values


TFieldDefList.FieldDefs
 CLX 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
 CLX 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.


 CLX Reference

TFieldDefList events

TFieldDefList	Alphabetically	Legend

Derived from TStringList

OnChange

OnChanging


 CLX Reference

TFieldDefList events

TFieldDefList	By object	Legend

OnChange

OnChanging


 CLX 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


 CLX 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
 CLX 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
 CLX 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


TFMTBCDField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TFMTBCDField properties

TFMTBCDField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TFMTBCDField.AsBCD
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TFMTBCDField events

TFMTBCDField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TFMTBCDField events

TFMTBCDField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

UpdateAction

Validate


TFMTBCDField.Create
 CLX 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


TGraphicField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TGraphicField properties

TGraphicField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

BlobSize

BlobType

Calculated

CanModify

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

Visible


 CLX Reference

TGraphicField events

TGraphicField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TGraphicField events

TGraphicField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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
 CLX 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

QDBGrids

Description

TGridDataLink is tailored to work with a TCustomDBGrid. It should only be used by the TCustomDBGrid class.


 CLX Reference

TGridDataLink properties

TGridDataLink	Alphabetically	Legend

In TGridDataLink

DefaultFields

FieldCount

Fields

SparseMap

Derived from TDataLink

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 CLX Reference

TGridDataLink properties

TGridDataLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

DefaultFields

Editing

Eof

FieldCount

Fields

ReadOnly

RecordCount

SparseMap


TGridDataLink.DefaultFields
 CLX 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
 CLX 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
 CLX 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.SparseMap
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TGuidField properties

TGuidField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsGuid

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TGuidField.AsGuid
 CLX Reference

TGuidField.AsGuid

TGuidField

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 converts between the internal representation of the GUID as a string and a TGUID type.


 CLX Reference

TStringField events

TStringField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TStringField events

TStringField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TField

TStringField

TGuidField


THandleObject
 CLX Reference

THandleObject

Hierarchy	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.


 CLX Reference

THandleObject Methods

THandleObject	By Object	Legend

Derived from 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


 CLX 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


Hierarchy

TObject

TSynchroObject

THandleObject


IAppServer
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TIndexDefs
 CLX Reference

TIndexDefs

Hierarchy	Properties	Methods	See also

TIndexDefs holds the list of available index definitions for a table.

Unit

DB

Description

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.


 CLX Reference

TIndexDefs properties

TIndexDefs	Alphabetically	Legend

In TIndexDefs

Items

Derived from TDefCollection

DataSet

Updated

Derived from TCollection

Count

ItemClass


 CLX Reference

TIndexDefs properties

TIndexDefs	By object	Legend

Count

DataSet

ItemClass

Items

Updated


TIndexDefs.Items
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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 CreateDataSet method. It cannot be used to add indexes to an already-existing table.


TIndexDefs.Create
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TIntegerField properties

TIntegerField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TIntegerField.AsFloat
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TIntegerField events

TIntegerField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TIntegerField events

TIntegerField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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
 CLX 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 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 Delphioverride 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 via a local provider.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

Note:	The PSIsSQLSupported method indicates whether the dataset can execute SQL commands at all, regardless of whether the dataset is SQL-based.


IProviderSupport.PSIsSQLSupported
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

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


TItemEditor
 CLX Reference

TItemEditor

Hierarchy	Properties	Methods	See also

TItemEditor provides edit item captions in views.

Unit

QGrids

Description

TItemEditor provides the edit box that appears when the user clicks on an editable item caption in a custom view.


 CLX Reference

TItemEditor Properties

TItemEditor	Alphabetically	Legend

Derived from TCustomEdit

Handle

Modified

SelLength

SelStart

SelText

Text

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TItemEditor Properties

TItemEditor	By Object	Legend

Action

Align

Anchors

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Modified

Name

Owner

Parent

ParentWidget

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

Text

Top

Visible

Width


 CLX Reference

TItemEditor Methods

TItemEditor	Alphabetically	Legend

In TItemEditor

Create

Destroy

EditFinished

KeyDown

KeyPress

KeyString

KeyUp

Derived from TCustomEdit

Clear

ClearSelection

CopyToClipboard

CutToClipboard

GetSelTextBuf

PasteFromClipboard

SelectAll

SetSelTextBuf

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TItemEditor Methods

TItemEditor	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EditFinished

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

KeyDown

KeyPress

KeyString

KeyUp

MethodAddress

MethodName

NewInstance

ParentToClient

PasteFromClipboard

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSelTextBuf

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TItemEditor.Create
 CLX Reference

TItemEditor.Create

TItemEditor	See also

Creates an instance of TItemEditor.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create and initialize an instance of TItemEditor.

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.


TItemEditor.Destroy
 CLX Reference

TItemEditor.Destroy

TItemEditor	See also

Destroys an instance of TItemEditor.

destructor Destroy; override;

Description

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


TItemEditor.EditFinished
 CLX Reference

TItemEditor.EditFinished

TItemEditor

Finalizes item editing.

procedure EditFinished(Accepted: Boolean); virtual;

Description

EditFinished is called automatically when the indicates that edting is finished, by pressing Return or Esc, by deselecting the item, etc. If editing was cancelled (for example, by the user pressing Esc), Accepted is False. Otherwise Accepted is True, indicating that EditFinished needs to update the caption.

As implemented in TItemEditor, EditFinished does the following. If Accepted is True and the Text property has been modified by the user, EditFinished calls the view's DoEdited method and assigns Text to the item Caption. In any case, initiates the Qt events that will destroy the editor control, and gives the focus to the view control.

Descendent classes can override or extend this behavior.


TItemEditor.KeyDown
 CLX Reference

TItemEditor.KeyDown

TItemEditor

Responds when the user presses a key.

procedure KeyDown(var Key: Word; Shift: TShiftState); override;

Description

TItemEditor overrides KeyDown in order to call the KeyDown method for the containing view control.


TItemEditor.KeyPress
 CLX Reference

TItemEditor.KeyPress

TItemEditor

Responds to keyboard input.

procedure KeyPress(var Key: Word; Shift: TShiftState); override;

Description

TItemEditor overrides KeyPress in order to call the KeyPress method for the containing view control.


TItemEditor.KeyString
 CLX Reference

TItemEditor.KeyString

TItemEditor

Generate events for MBCS input.

procedure KeyString(var S: WideString; var Handled: Boolean); dynamic;

Description

TItemEditor overrides KeyString in order to call the KeyString method for the containing view control.


TItemEditor.KeyUp
 CLX Reference

TItemEditor.KeyUp

TItemEditor

Responds when the user releases a key.

procedure KeyUp(var Key: Word; Shift: TShiftState); override;

Description

TItemEditor overrides KeyUp in order to call the KeyUp method for the containing view control.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomEdit

TItemEditor


TLargeintField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TLargeintField properties

TLargeintField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsLargeInt

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TLargeintField.AsFloat
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TLargeintField events

TLargeintField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TLargeintField events

TLargeintField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TMemoField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TMemoField properties

TMemoField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

BlobSize

BlobType

Calculated

CanModify

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

Visible


 CLX Reference

TMemoField events

TMemoField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TMemoField events

TMemoField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TField

TBlobField

TMemoField


TMasterDataLink
 CLX 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 objects already include a TMasterDataLink object.

Note:	Unidirectional datasets use their own dedicated datalink classes to perform the same types of tasks.


 CLX 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


 CLX Reference

TMasterDataLink properties

TMasterDataLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

DetailDataSet

Editing

Eof

FieldNames

Fields

ReadOnly

RecordCount


TMasterDataLink.DetailDataSet
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TMasterDataLink events

TMasterDataLink	Alphabetically	Legend

In TMasterDataLink

OnMasterChange

OnMasterDisable


 CLX Reference

TMasterDataLink events

TMasterDataLink	By object	Legend

OnMasterChange

OnMasterDisable


TMasterDataLink.OnMasterChange
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TNamedItem properties

TNamedItem	Alphabetically	Legend

In TNamedItem

DisplayName

Name

Derived from TCollectionItem

Collection

ID

Index


 CLX Reference

TNamedItem properties

TNamedItem	By object	Legend

Collection

DisplayName

ID

Index

Name


TNamedItem.DisplayName
 CLX 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
 CLX 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.


 CLX 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


 CLX 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


TNavDataLink
 CLX Reference

TNavDataLink

Hierarchy	Properties	Methods	See also

TNavDataLink helps manage the link to the dataset for a TDBNavigator object.

Unit

QDBCtrls

Description

TNavDataLink is tailored to work with a TDBNavigator. It should only be used by the TDBNavigator class.


 CLX Reference

TNavDataLink properties

TNavDataLink	Alphabetically	Legend

Derived from TDataLink

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 CLX Reference

TNavDataLink properties

TNavDataLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TNumericField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TNumericField properties

TNumericField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TNumericField.DisplayFormat
 CLX 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
 CLX 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.


 CLX Reference

TNumericField events

TNumericField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TNumericField events

TNumericField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TObjectField properties

TObjectField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TObjectField.AsString
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TObjectField events

TObjectField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TObjectField events

TObjectField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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
 CLX 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


TWebRequest
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.cgi/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
 CLX 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, 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
 CLX 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 contains the same information as PathInfo. To ensure cross platform code compatibility, use InternalPathInfo instead of PathInfo.


TWebRequest.InternalScriptName
 CLX 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 contains the same information as ScriptName. To ensure cross platform code compatibility, use InternalScriptName instead of ScriptName.


TWebRequest.Method
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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. TranslateURI is not relevant to CGI applications.


TWebRequest.UpdateMethodType
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 two descendants, which represent HTTP response messages in different types of web server applications. These descendants are

TApacheResponse objects in Apache server applications.

TCGIResponse objects in CGI server applications.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TWebResponse.ContentStream

TWebResponse	See also

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
 CLX Reference

TWebResponse.ContentType

TWebResponse	See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TWebResponse.SendResponse

TWebResponse	See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


DatabaseError procedure
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


LoginDialog function
 CLX 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
 CLX 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
 CLX 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.


BcdAdd procedure
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


AssignPrn procedure
 CLX Reference

AssignPrn procedure

See also 	Example

Assigns a text-file variable to the printer.

Unit

QPrinters

Category

text file routines

function AssignPrn(var AFile: Text; APrinter: TPrinter = nil): TPrinter;

Description

Call AssignPrn to cause all information written to the text file variable AFile to be directed to the printer object defined by the APrinter variable. After the variable is assigned, the application must call the Rewrite procedure.

Passing a printer object will allow you to work with multiple objects at the same time. If no TPrinter object is passed, a default one will be created. The function will return as the result the TPrinter object created. If APrinter is omitted, AssignPrn will free the internally created TPrinter object.


Printer function
 CLX Reference

Printer function

See also	Example

Returns a global instance of TPrinter to manage interaction with the printer.

Unit

QPrinters

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
 CLX Reference

SetPrinter function

See also

Replaces the global instance of TPrinter that manages interaction with the printer.

Unit

QPrinters

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.


FreeProcParams procedure
 CLX 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
 CLX 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 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
 CLX 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.


CheckSqlTimeStamp procedure
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TSQLConnection
 CLX 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  files (dbxdrivers and dbxconnections). The first, dbxdrivers, lists the installed driver types (Interbase, Oracle, and so on) and, for each driver, lists the libraries (DLLs or shared objects) it requires as well as the default settings for all connection parameters. The second file, dbxconnections, 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 and use it to connect to a database or to define new configurations and add them to dbxconnections. 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TSQLConnection properties

TSQLConnection	By object	Legend

ActiveStatements

AutoClone

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

VendorLib


TSQLConnection.ActiveStatements
 CLX 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
 CLX 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
 CLX 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
 CLX 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 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 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 file with your application even if you are using named connections.


TSQLConnection.ConnectionState
 CLX 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
 CLX 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
 CLX 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 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 or shared objects) that implement the specified driver.


TSQLConnection.GetDriverFunc
 CLX 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 file.

Note:	The GetDriverFunc, LibraryName, and VenderLib properties all reflect the values in the dbxdrivers file. Because these property values are published (stored with the connection component), it is possible to deploy an application without deploying the dbxdrivers file.


TSQLConnection.InTransaction
 CLX 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
 CLX 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
 CLX 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 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 file. Because these property values are published (stored with the connection component), it is possible to deploy an application without deploying the dbxdrivers file.


TSQLConnection.LoadParamsOnConnect
 CLX 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 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 file.

Note:	If you set LoadParamsOnConnect to True, you must be sure to deploy the dbxconnections file with your application. When you rely on the design-time associations, dbxconnections 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
 CLX 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 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
 CLX 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
 CLX 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
 CLX 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 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
 CLX Reference

TSQLConnection.ParamsLoaded

TSQLConnection	See also

Indicates when parameter values have been loaded from dbxconnections.

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 file.


TSQLConnection.SQLConnection
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TSQLConnection.VendorLib

TSQLConnection	See also

Specifies the client software library (DLL or shared object) 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 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 file. Because these property values are published (stored with the connection component), it is possible to deploy an application without deploying the dbxdrivers file.


 CLX Reference

TSQLConnection events

TSQLConnection	Alphabetically	Legend

In TSQLConnection

OnLogin

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect


 CLX Reference

TSQLConnection events

TSQLConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


TSQLConnection.OnLogin
 CLX 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.


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 file. Otherwise, it is a fully-qualified path name to a file that has the same format as the dbxconnections file. Typically, this file is created by making a copy of the dbxconnections 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 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 file immediately before opening a connection, overriding any values loaded by this method.


TSQLConnection.Rollback
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TSQLDataLink properties

TSQLDataLink	Alphabetically	Legend

In TSQLDataLink

DetailDataSet

Derived from TDataLink

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 CLX Reference

TSQLDataLink properties

TSQLDataLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

DetailDataSet

Editing

Eof

ReadOnly

RecordCount


TSQLDataLink.DetailDataSet
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TSQLDataSet properties

TSQLDataSet	Alphabetically	Legend

In TSQLDataSet

CommandType

Derived from TCustomSQLDataSet

CommandText

DataSource

DesignerData

IndexDefs

MaxBlobSize

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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TSQLDataSet properties

TSQLDataSet	By object	Legend

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

CommandText

CommandType

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

SortFieldNames

SparseArrays

SQLConnection

State

Tag

TransactionLevel


TSQLDataSet.CommandType
 CLX Reference

TSQLDataSet.CommandType

TSQLDataSet	See also	Example

Specifies the type of command to execute.

property CommandType: TSQLCommandType;

Description

Set CommandType to indicate 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 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, sorting by the fields listed in the SortFieldNames property.


 CLX 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


 CLX 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


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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
 CLX 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


TSQLMonitor
 CLX 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.


 CLX Reference

TSQLMonitor properties

TSQLMonitor	Alphabetically	Legend

In TSQLMonitor

Active

AutoSave

FileName

MaxTraceCount

SQLConnection

TraceCount

TraceList

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TSQLMonitor properties

TSQLMonitor	By object	Legend

Active

AutoSave

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

FileName

MaxTraceCount

Name

Owner

SQLConnection

Tag

TraceCount

TraceList


TSQLMonitor.Active
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TSQLMonitor events

TSQLMonitor	Alphabetically	Legend

In TSQLMonitor

OnLogTrace

OnTrace


 CLX Reference

TSQLMonitor events

TSQLMonitor	By object	Legend

OnLogTrace

OnTrace


TSQLMonitor.OnLogTrace
 CLX 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
 CLX 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.


 CLX Reference

TSQLMonitor methods

TSQLMonitor	Alphabetically	Legend

In TSQLMonitor

Create

Destroy

LoadFromFile

SaveToFile

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

LoadFromFile

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SaveToFile

SetSubComponent

UpdateAction


TSQLMonitor.Create
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TSQLQuery
 CLX 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.


 CLX Reference

TSQLQuery properties

TSQLQuery	Alphabetically	Legend

In TSQLQuery

SQL

Text

Derived from TCustomSQLDataSet

DataSource

DesignerData

IndexDefs

MaxBlobSize

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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TSQLQuery properties

TSQLQuery	By object	Legend

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

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

RowsAffected

SparseArrays

SQL

SQLConnection

State

Tag

Text

TransactionLevel


TSQLQuery.SQL
 CLX 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
 CLX 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.


 CLX 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


 CLX 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


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TSQLTimeStampField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TSQLTimeStampField properties

TSQLTimeStampField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TSQLTimeStampField.AsDateTime
 CLX 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
 CLX 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
 CLX 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
 CLX 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 default date and time format. 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.


TSQLTimeStampField.AsVariant
 CLX 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
 CLX 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
 CLX 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.

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
 CLX 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.


 CLX Reference

TSQLTimeStampField events

TSQLTimeStampField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TSQLTimeStampField events

TSQLTimeStampField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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


TStringField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TStringField properties

TStringField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TStringField.AsBCD
 CLX 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
 CLX 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
 CLX 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.


TStringField.AsFloat
 CLX 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
 CLX 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
 CLX 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
 CLX 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 (on Windows) or UTF-8 (on Linux) 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 uses a different character set than UTF-8 (on Linux) or ANSI (on Windows).

When Transliterate is True string fields call the dataset’s Translate method to translate UTF-8 or 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 UTF-8 or ANSI character set.


TStringField.Value
 CLX 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 UTF-8 or 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.


 CLX Reference

TStringField events

TStringField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TStringField events

TStringField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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


TTimeField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TTimeField properties

TTimeField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TTimeField.DataSize
 CLX 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.


 CLX Reference

TTimeField events

TTimeField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TTimeField events

TTimeField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TField

TDateTimeField

TTimeField


TVariantField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TVariantField properties

TVariantField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TVariantField.AsBCD
 CLX 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
 CLX 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.


TVariantField.AsDateTime
 CLX 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.


TVariantField.AsFloat
 CLX 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.


TVariantField.AsInteger
 CLX 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.


TVariantField.AsSQLTimeStamp
 CLX 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
 CLX 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.


TVariantField.AsVariant
 CLX 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.


TVariantField.Value
 CLX 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.


 CLX Reference

TVariantField events

TVariantField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TVariantField events

TVariantField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TField

TVariantField


TVarBytesField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TVarBytesField properties

TVarBytesField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TVarBytesField.DataSize
 CLX 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.


 CLX Reference

TVarBytesField events

TVarBytesField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TVarBytesField events

TVarBytesField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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


TWebRequestHandler
 CLX 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.


 CLX Reference

TWebRequestHandler properties

TWebRequestHandler	Alphabetically	Legend

In TWebRequestHandler

ActiveCount

CacheConnections

InactiveCount

MaxConnections

WebModuleClass

WebModuleFactory

WebModuleFactoryCount

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TWebRequestHandler properties

TWebRequestHandler	By object	Legend

ActiveCount

CacheConnections

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

InactiveCount

MaxConnections

Name

Owner

Tag

WebModuleClass

WebModuleFactory

WebModuleFactoryCount


TWebRequestHandler.ActiveCount
 CLX 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 Apache 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 Apache applications. Each CGI application handles only a single request message.


TWebRequestHandler.CacheConnections
 CLX 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 Apache 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 Apache Web applications.


TWebRequestHandler.InactiveCount
 CLX 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 Apache 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 Apache applications. Each CGI application handles only a single request message, so there is no need to cache unused data modules.


TWebRequestHandler.MaxConnections
 CLX 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 Apache applications. Each CGI application handles only a single request message, so there is no need to cache unused data modules.


TWebRequestHandler.WebModuleClass
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TWebRequestHandler methods

TWebRequestHandler	Alphabetically 	Legend

In TWebRequestHandler

ActivateWebModules

AddWebModuleFactory

Create

DeactivateWebModules

Destroy

HandleRequest

HandleException

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleRequest

HandleException

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TWebRequestHandler.Create
 CLX 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
 CLX 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
 CLX 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.

A Web application object contains only a single Web module. Usually, that Web module is a TWebModule object, but it may also be an ordinary data module that contains a TWebDispatcher object. If there is no Web module associated with the Web application, ActivateWebModule raises an exception. If the ActiveCount property is already at MaxConnections when ActivateWebModules is called, ActivateWebModules raises an exception.


TWebRequestHandler.AddWebModuleFactory
 CLX 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
 CLX 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
 CLX 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
 CLX 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


PEXTENSION_CONTROL_BLOCK type
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TWordField
 CLX 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TWordField properties

TWordField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TWordField.DataSize
 CLX 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.


 CLX Reference

TWordField events

TWordField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TWordField events

TWordField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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


TWideStringField
 CLX 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. 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.


 CLX 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

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TWideStringField properties

TWideStringField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

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

Visible


TWideStringField.AsString
 CLX 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 UTF-8 or 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
 CLX 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.


TWideStringField.DataSize
 CLX 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
 CLX 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 UTF-8 or 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.


 CLX Reference

TWideStringField events

TWideStringField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 CLX Reference

TWideStringField events

TWideStringField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 CLX 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

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TField

TStringField

TWideStringField


TAction
 CLX 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

QActnList

Description

TAction is a generic action component. It can be added to  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).

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 QStdActns unit.


 CLX Reference

TAction properties

TAction	Alphabetically	Legend

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TAction properties

TAction	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TAction events

TAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TAction events

TAction	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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 list component at design time. When instantiating TAction at runtime, assign a TActionList component to the new action’s ActionList property after calling Create.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction


TActionLink
 CLX 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

QActnList

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


 CLX Reference

TActionLink properties

TActionLink	Alphabetically	Legend

Derived from TBasicActionLink

Action


 CLX Reference

TActionLink properties

TActionLink	By object	Legend

Action


 CLX Reference

TActionLink events

TActionLink	Alphabetically	Legend

Derived from TBasicActionLink

OnChange


 CLX Reference

TActionLink events

TActionLink	By object	Legend

OnChange


 CLX Reference

TActionLink methods

TActionLink	Alphabetically	Legend

In TActionLink

IsCaptionLinked

IsCheckedLinked

IsEnabledLinked

IsHelpLinked

IsHintLinked

IsImageIndexLinked

IsShortCutLinked

IsVisibleLinked

SetCaption

SetChecked

SetEnabled

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


 CLX 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

IsHelpLinked

IsHintLinked

IsImageIndexLinked

IsShortCutLinked

IsVisibleLinked

MethodAddress

MethodName

NewInstance

SafeCallException

SetCaption

SetChecked

SetEnabled

SetHelpContext

SetHelpKeyword

SetHelpType

SetHint

SetImageIndex

SetShortCut

SetVisible

Update


TActionLink.IsCaptionLinked
 CLX 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
 CLX 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
 CLX 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.IsHelpLinked
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.SetCaption
 CLX Reference

TActionLink.SetCaption

TActionLink	See also

Introduces an interface for setting the caption on a client.

procedure SetCaption(const Value: TCaption); 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
 CLX 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
 CLX 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.SetHelpContext
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TActionLink.SetHint

TActionLink	See also

Introduces an interface for setting the hint for a client.

procedure SetHint(const Value: WIdeString); 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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

QActnList

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.


 CLX Reference

TActionList properties

TActionList	Alphabetically	Legend

Derived from TCustomActionList

ActionCount

Actions

Images

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TActionList properties

TActionList	By object	Legend

ActionCount

Actions

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Images

Name

Owner

Tag


 CLX Reference

TActionList events

TActionList	Alphabetically	Legend

Derived from TCustomActionList

OnChange

OnExecute

OnUpdate


 CLX Reference

TActionList events

TActionList	By object	Legend

OnChange

OnExecute

OnUpdate


 CLX Reference

TActionList methods

TActionList	Alphabetically	Legend

Derived from TCustomActionList

Create

Destroy

ExecuteAction

IsShortCut

UpdateAction

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

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


 CLX 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

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


TApplication
 CLX Reference

TApplication

Hierarchy	Properties	Methods	Events	Using TApplication	See also

TApplication is the type used for a GUI windowed application.

Unit

QForms

Description

TApplication encapsulates a windowed application. The methods and properties introduced in TApplication reflect the fundamentals established in the operating system to create, run, sustain, and destroy an application. TApplication thereby simplifies the interface between the developer and the windowing environment. For this purpose TApplication encapsulates behavior for

System-generated event processing.

Context-sensitive online help.

Menu accelerator and key processing.

Exception handling.

Each GUI application automatically declares an Application variable as the instance of the 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, TApplication introduces a number of events to which you may want to respond. To write an event handler for one of these events, add a method of the appropriate type to the main form in your application, and then at runtime, assign that method as the handler for the event.

Note:	 For application-wide properties and methods that affect the display, see TScreen.


 CLX Reference

TApplication properties

TApplication	Alphabetically	Legend

In TApplication

Active

CurrentHelpFile

Desktop

Display

EnableQtAccelerators

ExeName

Font

Handle

HelpContext

HelpFile

HelpKey

HelpSystem

HelpType

HelpWord

Hint

HintColor

HintHidePause

HintPause

HintShortCuts

HintShortPause

Icon

KeyState

MainForm

Palette

ShowHint

ShowMainForm

Style

Terminated

Title

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TApplication properties

TApplication	By object	Legend

Active

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

CurrentHelpFile

DesignInfo

Desktop

Display

EnableQtAccelerators

ExeName

Font

Handle

HelpContext

HelpFile

HelpKey

HelpSystem

HelpType

HelpWord

Hint

HintColor

HintHidePause

HintPause

HintShortCuts

HintShortPause

Icon

KeyState

MainForm

Name

Owner

Palette

ShowHint

ShowMainForm

Style

Tag

Terminated

Title


TApplication.Active
 CLX 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.CurrentHelpFile
 CLX 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 brings up context sensitive help (via the ContextHelp or KeywordHelp 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.Desktop
 CLX Reference

TApplication.Desktop

TApplication	See also

Returns the handle for the desktop widget.

property Desktop: QWidgetH;

Description

Read Desktop to obtain the handle for desktop widget, also called the root window. This handle can be used as a widget instance pointer when making low-level function calls into the Qt shared libraries that require an instance pointer to a widget.

Most applications do not need to work directly with the desktop widget. It provides information about the size of the screen, which is surfaced by the TScreen object. It can be used to draw on the desktop or change the background color of the desktop.  For example, the follow code snippet changes the background color of the desktop to clLime:

QWidget_setBackgroundColor(Application.Desktop,QColor(clLime));

QWidget_setBackgroundColor is declared in Qt.pas.

Note:	Desktop is read-only.


TApplication.Display
 CLX Reference

TApplication.Display

TApplication	See also

Returns the handle for the Display widget when the application is running on Linux.

type PDisplay = Pointer;

property Display: PDisplay;

Description

Read Display to obtain the handle for Display widget. This property should not be used in cross-platform applications, because it is only available on Linux.


TApplication.EnableQtAccelerators
 CLX Reference

TApplication.EnableQtAccelerators

TApplication	See also

Controls whether the underlying widget layer should handle accelerator keys.

property EnableQtAccelerators: Boolean;

Description

By default, EnableQtAccelerators is False, meaning that the components in the application handle all keystroke processing, including the processing of accelerator keys. However, when a Qt built-in dialog is active, the Qt layer must handle accelerator keys so that they are correctly handled in the dialog. This is managed automatically when using dialog components.

EnableQtAccelerators should only be True when a Qt dialog is active. Applications should not set this property except when explicitly launching a Qt dialog (without using the dialog components).


TApplication.ExeName
 CLX 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. By default this name is project1. 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.Font
 CLX Reference

TApplication.Font

TApplication	See also

Specifies the default font for the application.

property Font: TFont;

Description

Font encapsulates the default font for the application. When a form’s ParentFont property is True, this font becomes the font for that form.


TApplication.Handle
 CLX Reference

TApplication.Handle

TApplication	See also

Returns a unique 4-byte identifier that represents the instance of the underlying Qt QApplication widget.

property Handle: QApplicationH;

Description

Use Handle to return a typed pointer to the instance of the underlying QApplication object. This Handle can be used when making low-level function calls into the QT shared libraries, where the function call requires an instance pointer to a QApplication object.


TApplication.HelpContext
 CLX Reference

TApplication.HelpContext

TApplication	See also

Specifies the context ID that identifies the default help topic for the application.

property HelpContext: Integer;

Description

Set HelpContext to a context ID that identifies the application’s default help topic. Not all help systems support context IDs. When setting HelpContext, be sure that the current help system supports context IDs and that the application’s HelpType property is htContext.


TApplication.HelpFile
 CLX 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.HelpKey
 CLX Reference

TApplication.HelpKey

TApplication	See also

Indicates the key users press to trigger context-sensitive help.

property HelpKey: Integer;

Description

Set HelpKey to the key code for the key users should press to launch context-sensitive help. By default, this property indicates the F1 key.


TApplication.HelpSystem
 CLX 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 ContextHelp and KeywordHelp.


TApplication.HelpType
 CLX Reference

TApplication.HelpType

TApplication	See also

Indicates whether the application’s help topic is identified by context ID or by keyword.

property HelpType: THelpType;

Description

Set HelpType to specify whether the application identifies its default help topic by ID or keyword. When HelpType is htContext, the HelpContext property identifies the application’s help topic. When HelpType is htKeyword, the HelpWord property identifies the application’s help topic.


TApplication.HelpWord
 CLX Reference

TApplication.HelpWord

TApplication	See also

Specifies the keyword that identifies the default help topic for the application.

property HelpWord: string;

Description

Set HelpWord to a string (keyword) that identifies the application’s default help topic. The interpretation of HelpWord depends on which help system is used to display the topic. For example, when using HyperHelp (on Linux) or WinHelp (on Windows), HelpWord refers to an A link.

Note:	HelpWord is only used when the Application’s HelpType property is htKeyword.


TApplication.Hint
 CLX Reference

TApplication.Hint

TApplication	See also 	Example

Specifies the text string that appears in the Help Hint box.

property Hint: WideString;

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TApplication.Icon

TApplication	See also 	Example

Determines which icon represents the application.

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 desktop.


TApplication.KeyState
 CLX Reference

TApplication.KeyState

TApplication

Indicates the state of the Ctrl, Shift, and Alt keys.

property KeyState: TShiftState;

Description

Read KeyState to determine the state of the Ctrl, Shift, and Alt keys. TApplication sets this property when it receives keystroke events.


TApplication.MainForm
 CLX 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.Palette
 CLX Reference

TApplication.Palette

TApplication	See also

Provides access to the palette used by the application.

property Palette: TPalette;

Description

Read Palette to access the application's default palette. This palette is the one that controls use if they do not specify their own individual palette.


TApplication.ShowHint
 CLX 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
 CLX 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.Style
 CLX Reference

TApplication.Style

TApplication

Identifies the style object that gives the application its default “look and feel”.

property Style: TApplicationStyle;

Description

Use Style to access the application’s Style object. This object has a number of events that influence the way controls are painted in the application. In addition, you can use this Style object to assign a default style that gives your application a thematic “look”.


TApplication.Terminated
 CLX 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.

Terminated is set to True when the main window of the application has closed, or when the Terminate method is 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
 CLX Reference

TApplication.Title

TApplication	See also

Contains the text that appears below the icon representing the application when it is minimized.

property Title: WideString;

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 project 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.


 CLX Reference

TApplication events

TApplication	Alphabetically	Legend

In TApplication

OnActionExecute

OnActionUpdate

OnActivate

OnDeactivate

OnEvent

OnException

OnHelp

OnHint

OnIdle

OnMinimize

OnModalBegin

OnModalEnd

OnRestore

OnShortCut

OnShowHint


 CLX Reference

TApplication events

TApplication	By object	Legend

OnActionExecute

OnActionUpdate

OnActivate

OnDeactivate

OnEvent

OnException

OnHelp

OnHint

OnIdle

OnMinimize

OnModalBegin

OnModalEnd

OnRestore

OnShortCut

OnShowHint


TApplication.OnActionExecute
 CLX 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.


TApplication.OnActionUpdate
 CLX 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.


TApplication.OnActivate
 CLX 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 application back to any window of the application.


TApplication.OnDeactivate
 CLX 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 application.


TApplication.OnEvent
 CLX Reference

TApplication.OnEvent

TApplication	See also

Occurs when the application receives a Qt event notification.

type TEventEvent = procedure (Sender: QObjectH; Event: QEventH; var Handled: Boolean) of object;

property OnEvent: TEventEvent;

Description

An OnEvent event handler allows an application to respond to events other than those declared in the events for TApplication. OnEvent occurs when a widget that implements one of the controls in the application, or the application widget, notifies the application that an event occurred. Such events include mouse events, keyboard events, system changes (changes to the palette, application shutdown, changes to the application title, and so on), and changes to the widget (moves, resizes, the need to repaint, the destruction of the widget, and so on)

The TEventEvent type is the type of the OnEvent event. The Sender parameter identifies the widget that generated the event notification. This can represent the a widget that implements a control in the application (such as a form or one of the controls in that form), or it can represent the application widget. The Event parameter is the handle to the Qt event object. It can be used to determine the type of event that occurred and information about that event. The Handled parameter indicates whether the event handler responded to the event. Set Handled to True if the event has been completely handled, to prevent subsequent processing.


TApplication.OnException
 CLX 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.


TApplication.OnHelp
 CLX Reference

TApplication.OnHelp

TApplication	See also

Occurs when the application receives a request for help.

type THelpEvent = function (HelpType: THelpType; HelpContext: Integer; HelpKeyword: string; HelpFile: string; var Handled: Boolean): Booleanof object;

property OnHelp: THelpEvent;

Description

Write an OnHelp event handler to perform special processing when the user requests help. This event occurs when the help system is invoked by a call to InvokeHelp, ContextHelp, or KeywordHelp.

HelpType indicates whether the help topic is identified by context ID or by keyword.

HelpContext identifies the help topic to display when HelpType is htContext.

HelpKeyword identifies the help topic to display when HelpType is htKeyword.

HelpFile identifies the help file that contains the specified topic.

Handled returns an indication of whether the default help system should display the specified topic after the event handler exits. Set Handled to True if the event handler displays a help topic, and this prevents the application from proceeding to display the identified topic.

The event handler returns True if it succeeds, False if it fails.


TApplication.OnHint
 CLX 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.

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
 CLX 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. When Done is False, the application actions do not receive an OnUpdate event.

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.


TApplication.OnMinimize
 CLX 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.


TApplication.OnModalBegin
 CLX Reference

TApplication.OnModalBegin

TApplication	See also

Occurs immediately before the application displays a modal form.

property OnModalBegin: TNotifyEvent;

Description

Write an OnModalBegin to perform actions when the application is about to show a modal form. OnModalBegin only occurs for the first modal form. That is, if the modal form displays another modal form, there is no second OnModalBegin event when the second modal form is launched.

When the modal form closes, the application receives an OnModalEnd event. Thus, every OnModalBegin event is paired with an OnModalEnd event.


TApplication.OnModalEnd
 CLX Reference

TApplication.OnModalEnd

TApplication	See also

Occurs immediately after a modal form closes.

property OnModalEnd: TNotifyEvent;

Description

Write an OnModalEnd to perform actions when the application closes all modal forms. OnModalEnd occurs when the application leaves the modal state introduced by the first modal form that is opened.


TApplication.OnRestore
 CLX 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.


TApplication.OnShortCut
 CLX 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.


TApplication.OnShowHint
 CLX 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.


 CLX Reference

TApplication methods

TApplication	Alphabetically	Legend

In TApplication

ActivateHint

BringToFront

CancelHint

ContextHelp

ControlDestroyed

Create

CreateForm

CreateHandle

Destroy

ExecuteAction

HandleException

HandleMessage

HideHint

HintMouseMessage

HookSynchronizeWakeup

Initialize

InvokeHelp

IsShortCut

KeywordHelp

MessageBox

Minimize

ModalFinished

ModalStarted

NormalizeTopMosts

ProcessMessages

Restore

RestoreTopMosts

Run

ShowException

Terminate

UnhookSynchronizeWakeup

UpdateAction

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

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


 CLX Reference

TApplication methods

TApplication	By object	Legend

ActivateHint

AfterConstruction

Assign

BeforeDestruction

BringToFront

CancelHint

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ContextHelp

ControlDestroyed

Create

CreateForm

CreateHandle

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleException

HandleMessage

HasParent

HideHint

HintMouseMessage

HookSynchronizeWakeup

InheritsFrom

Initialize

InitInstance

InsertComponent

InstanceSize

InvokeHelp

IsImplementorOf

IsShortCut

KeywordHelp

MessageBox

MethodAddress

MethodName

Minimize

ModalFinished

ModalStarted

NewInstance

NormalizeTopMosts

ProcessMessages

ReferenceInterface

RemoveComponent

RemoveFreeNotification

Restore

RestoreTopMosts

Run

SafeCallException

SetSubComponent

ShowException

Terminate

UnhookSynchronizeWakeup

UpdateAction


TApplication.ActivateHint
 CLX 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
 CLX 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
 CLX 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.ContextHelp
 CLX Reference

TApplication.ContextHelp

TApplication	See also

Displays a specified help topic given a context ID.

function ContextHelp(Context: TContextHelp): Boolean;

Description

Use ContextHelp to bring up the help topic specified by the Context parameter from the file specified in the CurrentHelpFile property. ContextHelp 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 the help system should be called, then ContextHelp invokes the current help system, passing it the specified help context.

ContextHelp returns False if there is no current help system to call. In all other cases, ContextHelp returns True.


TApplication.ControlDestroyed
 CLX 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
 CLX 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
 CLX 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
 CLX 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 executables, the application’s constructor calls CreateHandle. In shared objects it does not.


TApplication.Destroy
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TApplication.HandleMessage

TApplication	See also 	Example

Interrupts the execution of an application to process a single event.

procedure HandleMessage;

Description

HandleMessage interrupts the execution of the application so that the widget layer can process a single event before returning control to 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 event-based while priority actions are also being processed. Instead, call ProcessMessages when processing more than just events.


TApplication.HideHint
 CLX 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
 CLX 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.HookSynchronizeWakeup
 CLX 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
 CLX 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. 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.InvokeHelp
 CLX Reference

TApplication.InvokeHelp

TApplication	See also

Causes the application to display context-sensitive help.

procedure InvokeHelp; virtual;

Description

Call InvokeHelp to display context-sensitive help for the application.

InvokeHelp first checks whether there is an active form, and if so, invokes its context-sensitive help. If there is no active form, InvokeHelp checks the application’s HelpType property. If HelpType is htKeyword, InvokeHelp displays the help topic identified by the HelpWord property. If HelpType is htContext, it displays the help topic identified by the HelpContext property.


TApplication.IsShortCut
 CLX Reference

TApplication.IsShortCut

TApplication	See also

Handles a shortcut key combination that the user enters.

function IsShortCut(Key: Integer; Shift: TShiftState; KeyText: WideString): Boolean;

Description

IsShortCut is called automatically when the user presses a key. It allows the application to dispatch shortcut keys and bypass the standard keystroke processing.

Key is the key code for the key the user pressed.

Shift indicates the state of the shift, Ctrl, and Alt keys.

KeyText is the text typed when the user pressed the key.

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 an action or with the application’s main form.

IsShortCut returns True if it recognizes and handles the shortcut key combination, False otherwise.


TApplication.KeywordHelp
 CLX Reference

TApplication.KeywordHelp

TApplication	See also

Displays a specified help topic given a keyword.

function KeywordHelp(const HelpKeyword: string): Boolean;

Description

Use KeywordHelp to bring up the help topic specified by the HelpKeyword parameter from the file specified in the CurrentHelpFile property. KeywordHelp 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 the help system should be called, then KeywordHelp invokes the current help system, passing it the specified help keyword.

KeywordHelp returns False if there is no current help system to call. In all other cases, KeywordHelp returns True.


TApplication.MessageBox
 CLX Reference

TApplication.MessageBox

TApplication 	See also	Example

Displays a specified message to the user.

function MessageBox(const Text: WideString; const Caption: WideString = ''; Buttons: TMessageButtons) = [smbOK]; Style: TMessageStyle = smsInformation; Default: TMessageButton) = smbOK; Escape: TMessageButton) = smbCancel): TMessageButton;

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.

The value of the Text parameter is the message.

The value of the Caption parameter is the caption that appears in the title bar of the dialog box. The Buttons parameter indicates what buttons appear in the message box.

The Style parameter indicates the use of the message box.

The Default parameter indicates which of the buttons in the Buttons parameter is clicked when the user types the space bar.

The Escape parameter indicates which of the buttons in the Buttons parameter is clicked when the user types the escape key.

MessageBox returns 0 if there isn’t enough memory to create the message box. Otherwise it returns which button the user clicked.


TApplication.Minimize
 CLX 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.ModalFinished
 CLX Reference

TApplication.ModalFinished

TApplication	See also

Generates an OnModalEnd event when all modal forms are shut down.

procedure ModalFinished(Sender: TObject);

Description

ModalFinished is called automatically when a modal form shuts down. It checks whether the form that shut down is the last modal form, and if so, generates an OnModalEnd event.


TApplication.ModalStarted
 CLX Reference

TApplication.ModalStarted

TApplication	See also

Generates an OnModalBegin event when the first modal form is displayed.

procedure ModalStarted(Sender: TObject);

Description

ModalStarted is called automatically when a modal form is displayed. It checks whether the application is already displaying a modal form, and if not, generates an OnModalBegin event.


TApplication.NormalizeTopMosts
 CLX 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 QtAPI functions, 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 CLX methods and functions to display message boxes.

To return the forms designated as fsStayOnTop to be topmost again, call RestoreTopMosts.


TApplication.ProcessMessages
 CLX Reference

TApplication.ProcessMessages

TApplication	See also 	Example

Interrupts the execution of an application so that it can process the event queue.

procedure ProcessMessages;

Description

Call ProcessMessages to permit the application to process events that are currently in the queue.

Note:	ProcessMessages does not allow the application to go idle, whereas HandleMessage does.


TApplication.Restore
 CLX 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
 CLX 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 method, to a topmost position.


TApplication.Run
 CLX 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.


TApplication.ShowException
 CLX 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 CLX-based application, since the default CLX exception handler calls ShowException automatically.


TApplication.Terminate
 CLX 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.


TApplication.UnhookSynchronizeWakeup
 CLX 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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TApplication


TBasicAction
 CLX 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.


 CLX Reference

TBasicAction properties

TBasicAction	Alphabetically	Legend

In TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TBasicAction properties

TBasicAction	By object	Legend

ActionComponent

ComponentCount

ComponentIndex

ComponentState

Components

ComponentStyle

DesignInfo

Name

Owner

Tag


TBasicAction.ActionComponent
 CLX 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.


 CLX Reference

TBasicAction events

TBasicAction	Alphabetically	Legend

In TBasicAction

OnChange

OnExecute

OnUpdate


 CLX Reference

TBasicAction events

TBasicAction	By object	Legend

OnChange

OnExecute

OnUpdate


TBasicAction.OnChange
 CLX 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
 CLX 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 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
 CLX 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.


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TBaseComponentEditor
 CLX 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.


 CLX Reference

TBaseComponentEditor properties

TBaseComponentEditor	Alphabetically 	Legend

Derived from TInterfacedObject

RefCount


 CLX Reference

TBaseComponentEditor properties

TBaseComponentEditor	By object 	Legend

RefCount


 CLX 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


 CLX 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
 CLX 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


TBasePropertyEditor
 CLX 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.


 CLX Reference

TBasePropertyEditor properties

TBasePropertyEditor	Alphabetically 	Legend

Derived from TInterfacedObject

RefCount


 CLX Reference

TBasePropertyEditor properties

TBasePropertyEditor	By object 	Legend

RefCount


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

 TBevel

Hierarchy	Properties	Methods	See also

TBevel represents a beveled outline.

Unit

QExtCtrls

Description

Use TBevel to create beveled boxes, frames, or lines. The bevel can appear raised or lowered.


 CLX Reference

TBevel properties

TBevel	Alphabetically	Legend

In TBevel

Shape

Style

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Enabled

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Parent

ParentShowHint

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TBevel properties

TBevel	By object	Legend

Action

Align

Anchors

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentShowHint

Shape

ShowHint

Style

Tag

Top

Visible

Width


TBevel.Shape
 CLX 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
 CLX 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.


 CLX Reference

TBevel methods

TBevel	Alphabetically	Legend

In TBevel

Create

Derived from TGraphicControl

Destroy

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

Invalidate

ParentToClient

Refresh

Repaint

ScreenToClient

SendToBack

SetBounds

Show

Update

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX 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

DragDrop

Dragging

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

Show

Update

UpdateAction


TBevel.Create
 CLX 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


TBrush
 CLX Reference

TBrush

Hierarchy	Properties	Methods	Events	Using TBrush	See also

TBrush represents the color and pattern used to fill solid shapes.

Unit

QGraphics

Description

TBrush encapsulates the Qt shared library's brush object (QBrush) and is used to fill solid shapes, such as rectangles and ellipses, with a color or pattern.


 CLX Reference

TBrush properties

TBrush	Alphabetically	Legend

In TBrush

Bitmap

Color

Handle

Style


 CLX Reference

TBrush properties

TBrush	By object	Legend

Bitmap

Color

Handle

Style


TBrush.Bitmap
 CLX 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.

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.

Note:	When the bitmap is used for a brush, its TransparentColor and Transparent mode properties are ignored.


TBrush.Color
 CLX 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
 CLX Reference

TBrush.Handle

TBrush

Provides access to the unique 4-byte identifier that represents the instance of a Qt QBrush object.

property Handle: QBrushH;

Description

The Handle property provides access to the unique 4-byte identifier that represents the instance of a QT QBrush object and is used to fill solid shapes, such as rectangles and ellipses, with a color or pattern.


TBrush.Style
 CLX Reference

TBrush.Style

TBrush	See also 	Example

Specifies the pattern for the brush.

type TBrushStyle = (bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross, bsDense1, bsDense2, bsDense3, bsDense4, bsDense5, bsDense6, bsDenss7);

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

bsDense1	bsDense2

bsDense3	bsDense4

bsDense5	bsDense6

bsDense7

Tip:	Set the Style property to bsClear to eliminate flicker when the object repaints.


 CLX Reference

TBrush events

TBrush	Alphabetically	Legend

Derived from TGraphicsObject

OnChange


 CLX Reference

TBrush events

TBrush	By object	Legend

OnChange


 CLX Reference

TBrush methods

TBrush	Alphabetically	Legend

In TBrush

Assign

Create

Destroy

OwnHandle

ReleaseHandle

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


 CLX 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

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

OwnHandle

ReleaseHandle

SafeCallException


TBrush.Assign
 CLX 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
 CLX Reference

TBrush.Create

TBrush	See also

Creates and initializes a TBrush instance.

constructor Create; overload;

constructor Create(AHandle: QBrushH); overload;

Description

Create generates a new TBrush instance.

Call the second form of the constructor to create a TBrush object, based on a QBrush object, identified by the AHandle parameter, at runtime. The AHandle parameter must be a QBrushH handle that points to a valid Qt QBrush object. Ownership of the handle is automatically assumed.


TBrush.Destroy
 CLX 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.If the instance of TBrush was created using the Create method, Destroy frees the underlying QBrush object identified by the Handle property.

If the instance of TBrush was created using the Create(AHandle) method Destroy frees the underlying QBrush object identified by the Handle property, only if the OwnHandle method was called.


TBrush.OwnHandle
 CLX Reference

TBrush.OwnHandle

TBrush	See also

Cause TBrush to assume ownership of the underlying QBrush object.

procedure OwnHandle;

Description

Call OwnHandle to assume ownership of the underlying QBrush object instance. Use it when you need to accept ownership (or destroy) of the QBrush handle.


TBrush.ReleaseHandle
 CLX Reference

TBrush.ReleaseHandle

TBrush	See also

Returns the handle to the underlying QBrush object so that the TBrush object no longer knows about the handle.

function ReleaseHandle: QBrushH;

Description

Use ReleaseHandle to disassociate TBrush from the QBrush handle. Use it when you need to give a QBrush handle to a routine or object that will assume ownership (or destroy) the QBrush handle. Calling ReleaseHandle on a handle you do not own does not destroy the handle being released.


Hierarchy

TObject

TPersistent

TGraphicsObject

TBrush


TButtonControl
 CLX Reference

TButtonControl

Hierarchy	Properties	Methods	Events	See also

TButtonControl is the base class for objects that represent button controls.

Unit

QStdCtrls

Description

TButtonControl encapsulates behavior common to all button controls, check boxes, and radio buttons. Use TButtonControl as a base class when defining a standard  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 button controls. These controls do not descend from TButtonControl.


 CLX Reference

TButtonControl properties

TButtonControl	Alphabetically	Legend

In TButtonControl

AutoRepeat

Caption

Checked

ClicksDisabled

Down

Handle

State

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TButtonControl Properties

TButtonControl	By Object	Legend

Action

Align

Anchors

AutoRepeat

BoundsRect

Brush

Caption

Checked

ChildHandle

ClicksDisabled

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Down

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentWidget

ShowHint

Showing

State

TabOrder

TabStop

Tag

Top

Visible

Width


TButtonControl.AutoRepeat
 CLX Reference

TButtonControl.AutoRepeat

TButtonControl

Determines whether the OnClick event continues to be generated at regular intervals while the button is in the depressed state.

property AutoRepeat: Boolean;

Description

Use AutoRepeat to specify whether an OnClick event continues to be generated at regular intervals while the button is in the depressed state. If AutoRepeat is set to False, a single OnClick event is generated while the button is depressed. If AutoRepeat is set to True, an the OnClick event continues to be generated at regular intervals while the button is in the depressed state.

The default value is False


TButtonControl.Caption
 CLX Reference

TButtonControl.Caption

TButtonControl 	See also

Specifies the caption that appears on the button.

property Caption: string;

Description

Use Caption to specify the text string that appears on the button.

To underline a character in a Caption that appears on the button, include an ampersand (&) before the character. This type of character is called an accelerator character. The user can then select the button by pressing Alt while typing the underlined character. To display an ampersand character in the caption, use two ampersands (&&).


TButtonControl.Checked
 CLX 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
 CLX 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.


TButtonControl.Down
 CLX Reference

TButtonControl.Down

TButtonControl	See also

Specifies whether a button control is selected (down) or unselected (up).

property Down: Boolean;

Description

Read Down to determine whether a button control is selected (down) or unselected (up). Set Down to change the state of a button control. Setting Down to True causes the button control to be selected and setting Down to False causes the Button control to be unselected.


TButtonControl.Handle
 CLX Reference

TButtonControl.Handle

TButtonControl

Returns a unique 4-byte identifier that represents the instance of the underlying Qt QButton widget.

property Handle: QButtonH;

Description

Use Handle to return a typed pointer to the instance of the underlying QButton object. This Handle can be used when making low-level function calls into the QT shared libraries, where the function call requires an instance pointer to a QButton object.


TButtonControl.State
 CLX Reference

TButtonControl.State

TButtonControl	See also

Returns the state of a button control.

property State: TToggleState;

Description

Read State to determine the state of a button control. State returns one of the following values:

Value	Description

tsOff	The button control is not selected.

tsNoChange	The button control's state has not changed.

tsOn	The button control is selected.


 CLX Reference

TButtonControl events

TButtonControl	Alphabetically	Legend

In TButtonControl

OnStateChanged


 CLX Reference

TButtonControl Events

TButtonControl	By Object	Legend

OnStateChanged


TButtonControl.OnStateChanged
 CLX Reference

TButtonControl.OnStateChanged

TButtonControl 	See also

Occurs when the state of a button control changes.

type TStateChangedEvent = procedure(Sender: TObject; State: TToggleState) ofobject;

property OnStateChanged: TStateChangedEvent;

Description

Write an OnStateChanged event handler to take specific action when a button control changes state.

The Sender parameter is the button (TObject) that changed state.

The State parameter indicates whether the button toggled from On to Off (State = 0), or from Off to On (State = 2).


 CLX Reference

TButtonControl methods

TButtonControl	Alphabetically	Legend

In TButtonControl

AccelChar

ActionChange

AnimateClick

Create

GetActionLinkClass

GetChecked

GetText

HookEvents

SetChecked

SetText

StateChanged

Toggle

WantKey

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TButtonControl methods

TButtonControl	By object	Legend

AccelChar

ActionChange

AfterConstruction

AnimateClick

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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetActionLinkClass

GetChecked

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetText

HandleAllocated

HandleNeeded

HasParent

Hide

HookEvents

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetChecked

SetFocus

SetSubComponent

SetText

Show

StateChanged

Toggle

Update

UpdateAction

UpdateControlState

WantKey


TButtonControl.AccelChar
 CLX Reference

TButtonControl.AccelChar

TButtonControl	See also

Returns the accelerator character for the button.

function AccelChar: Char;

Description

Use AccelChar to return the accelerator character set in the Caption. If no accelerator character is set AccelChar returns nil. An accelerator character is prefaced by the ampersand (&). For example, a button text containing a shortcut character (for example the 'x' in E&xit) automatically defines an ALT+letter accelerator for the button.


TButtonControl.ActionChange
 CLX 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.AnimateClick
 CLX Reference

TButtonControl.AnimateClick

TButtonControl	See also

Causes the Button control to be automatically depressed and released

procedure AnimateClick;

Description

Call AnimateClick to cause the Button control to be automatically depressed and released, as if a user had actually pressed the button. All events that are associated with a button being pressed are generated. This differs from the Click method, which only causes an OnClick event to be generated.


TButtonControl.Create
 CLX Reference

TButtonControl.Create

TButtonControl

Creates a button control.

constructor Create(AOwner: TComponent); override;

Description

Create calls the inherited constructor,then setsthe ColorRole and ColorRoleText of the button control's palette to crButton and crButtonText, respectively.


TButtonControl.GetActionLinkClass
 CLX 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
 CLX 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.GetText
 CLX Reference

TButtonControl.GetText

TButtonControl	See also

Returns the value in the Caption property for the button control.

function GetText: TCaption; override;

Description

Returns the button text, or null string if the button has no text.

The GetText method is the protected read implementation of the Caption property.


TButtonControl.HookEvents
 CLX Reference

TButtonControl.HookEvents

TButtonControl

Provides an interface to create and install callback functions for system events and widget signals.

procedure HookEvents; override;

Description

Component writers can override HookEvents to create and install callback functions for specific widget signals when creating new components.

HookEvents method creates a hook object for the component if one does not exist and then creates and installs callback functions for all system events and the destroyed signal for the widget. The destroyed signal generates a destroyed event which is processed by the WidgetDestroyed notification method.

As implemented in TButtonControl, HookEvents calls the inherited HookEvents method and then installs callback methods for the ViewportEventHandler and MeasureItemHook hooks.

When creating and installing callbacks for a descendent component, the following code is used:

procedure TMyCustomComponent.HookEvents;

var

  Method: TMethod;

begin

  QObject_signalname_event(Method) := SignalNameHook;

  QObject_hook_hook_signalname(FHooks, Method);

  inherited HookEvents;

end;

Where signalname is the widget signal that needs to be installed and SignalNameHook is the callback method that will will be called when the widget emits this signal.


TButtonControl.SetChecked
 CLX 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.SetText
 CLX Reference

TButtonControl.SetText

TButtonControl	See also

Set the value in the Caption property for the button control.

procedure SetText (const Value: TCaption); override;

Description

Sets the button to display text and repaints The SetText method is the protected write implementation of the Caption property.


TButtonControl.StateChanged
 CLX Reference

TButtonControl.StateChanged

TButtonControl	See also

Generates an OnStateChanged event.

procedure StateChanged(State: TToggleState); dynamic;

Description

StateChanged is called automatically when the state of a button control is changed (when a user toggles a button). Generates an OnStateChanged event.

The State parameter is 0 if the button toggled from On to Off, or 2 if the button toggled from Off to On. (Note: State = 1 when the button is in the "No Change" state, but this method would not be called unless a change occurred.)


TButtonControl.Toggle
 CLX Reference

TButtonControl.Toggle

TButtonControl	See also

Toggles the state of a button control.

procedure Toggle;

Description

Call Toggle to change the state of a button control. The Toggle method changes the state of a button control (Up to Down / Down to Up for push buttons and radio buttons, and Checked/Unchecked for check boxes) depending on the current state of the button control.

Note: For the TButton component, unless the ToggleButton property of TButton is set to True the Toggle method does nothing. If the ToggleButton property of TButton is set to False, use the Down property to change the state of the TButton component.


TButtonControl.WantKey
 CLX Reference

TButtonControl.WantKey

TButtonControl

Processes keystrokes.

function WantKey(Key: Integer; Shift: TShiftState; const KeyText: WideString): Boolean; override;

Description

WantKey tries to handle the keystroke message specified by the Key and Shift parameters.

Key is the integer representation of the key that the user pressed. This can be the ordinal value of the character, or a symbolic key code.

Shift indicates whether the Shift, Alt, and/or Control keys were simultaneously pressed.

KeyText is the character value of the key that was pressed.

WantKey returns True if the method handled the keystroke, False otherwise.

As implemented in TButtonControl, WantKey checks whether the keystroke represents this button’s accelerator key, and if so, simulates a mouse click.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TButtonControl


TButtonActionLink
 CLX Reference

TButtonActionLink

Hierarchy	Properties	Methods	Events

TButtonActionLink is an action link designed specifically for button control clients.

Unit

QStdCtrls

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.


 CLX Reference

TButtonActionLink properties

TButtonActionLink	Alphabetically	Legend

Derived from TBasicActionLink

Action


 CLX Reference

TButtonActionLink properties

TButtonActionLink	By object	Legend

Action


 CLX Reference

TButtonActionLink events

TButtonActionLink	Alphabetically	Legend

Derived from TBasicActionLink

OnChange


 CLX Reference

TButtonActionLink events

TButtonActionLink	By object	Legend

OnChange


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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

TWidgetControlActionLink

TButtonActionLink


TButton
 CLX Reference

 TButton

Hierarchy	Properties	Methods	Events	Using TButton	See also

TButton is a push button control.

Unit

QStdCtrls

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.


 CLX Reference

TButton properties

TButton	Alphabetically	Legend

In TButton

Cancel

Default

Handle

ModalResult

ToggleButton

Derived from TButtonControl

Caption

Down

Derived from TWidgetControl

Bitmap

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TButton Properties

TButton	By Object	Legend

Action

Align

Anchors

Bitmap

BoundsRect

Brush

Cancel

Caption

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

Default

DesignInfo

Down

DragMode

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

ModalResult

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

ToggleButton

Top

Visible

Width


TButton.Cancel
 CLX 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
 CLX 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
 CLX 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.


TButton.ToggleButton
 CLX Reference

TButton.ToggleButton

TButton	See also

Specifies whether pressing the button toggles it between an On and Off state.

property ToggleButton: Boolean;

Description

Use ToggleButton to determine whether a button is a toggle button. When the user clicks a toggle button, it changes state from On to Off (or Off to On) and remains in the new state. Setting Togglebutton to True makes the button a toggle button, and setting ToggleButton to False makes it a simple push button.

Note:	When ToggleButton is True, the button does not paint its background bitmap when the Down property is True.


TButton.Handle
 CLX Reference

TButton.Handle

TButton

Indicates the handle of the underlying widget.

property Handle: QPushButtonH;

Description

Handle is a 4-byte value that uniquely identifies the underlying widget instance used to implement the button. This Handle can be used when making low-level function calls into the QT shared libraries, where the function call requires an instance pointer to a QPushButton object.


 CLX Reference

TButton events

TButton	Alphabetically	Legend

In TButton

OnToggled

Derived from TButtonControl

OnStateChanged

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TButton Events

TButton	By Object	Legend

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag

OnStateChanged

OnToggled


TButton.OnToggled
 CLX Reference

TButton.OnToggled

TButton	See also

Occurs when the button has just toggled.

type TToggledEvent = procedure(Sender: TObject; Toggled: Boolean) ofobject;

property OnToggled: TToggledEvent;

Description

Write an OnToggled event handler to take specific action when a toggle button changes state.

The Sender parameter is the button (TObject) that was toggled.

The Toggled parameter indicates whether the button toggled from False to True (Toggled=True) or from True to False (Toggled=False).


 CLX Reference

TButton Methods

TButton	Alphabetically	Legend

In TButton

Click

Create

Derived from TButtonControl

AccelChar

AnimateClick

Toggle

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TButton Methods

TButton	By Object	Legend

AccelChar

AfterConstruction

AnimateClick

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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Toggle

Update

UpdateAction

UpdateControlState


TButton.Click
 CLX 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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TButtonControl

TButton


TCanvas
 CLX 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

QGraphics

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.


 CLX Reference

TCanvas properties

TCanvas	Alphabetically	Legend

In TCanvas

Brush

ClipRect

CopyMode

Font

Handle

LockCount

Pen

PenPos

StartCount

TextAlign


 CLX Reference

TCanvas properties

TCanvas	By object	Legend

Brush

ClipRect

CopyMode

Font

Handle

LockCount

Pen

PenPos

StartCount

TextAlign


TCanvas.Brush
 CLX 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.

Note:	Brush must be set to bsSolid before you can paint.


TCanvas.ClipRect
 CLX Reference

TCanvas.ClipRect

TCanvas	See also

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
 CLX Reference

TCanvas.CopyMode

TCanvas	See also	Example

Specifies how a graphical image is copied onto the canvas.

type TCopyMode = (cmBlackness, cmDstInvert, cmMergeCopy, cmMergePaint, cmNotSrcCopy, cmNotSrcErase, cmPatCopy, cmPatInvert, cmPatPaint, cmSrcAnd, cmSrcCopy, cmSrcErase, cmSrcInvert, cmSrcPaint, cmWhiteness, cmCreateMask);

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.

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.

cmCreateMask	Applies the source bitmap to the image on the canvas by removing all parts of the image that appear as the clDontMask color in the source bitmap.


TCanvas.Font
 CLX 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
 CLX Reference

TCanvas.Handle

TCanvas	See also

Provides access to the unique 4-byte identifier that represents the instance of a Qt QPainter object.

property Handle: QPainterH;

Description

The Handle property provides access to the unique 4-byte identifier that represents the instance of a Qt QPainter object. This Handle can be used when making low-level function calls into the QT shared libraries, where the function call requires an instance pointer to a QPainter object.


TCanvas.LockCount
 CLX 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
 CLX 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
 CLX 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.StartCount
 CLX Reference

TCanvas.StartCount

TCanvas	See also

Maintains a count of the number of active paint operations.

property StartCount: Integer;

Description

Every operation that paints on the canvas must begin with a call to the Start method and end with a call to the Stop method. (TCanvas automatically makes these calls when you draw to the canvas using the TCanvas methods.) Each call to the Start method increments StartCount and each call to the Stop method decrements StartCount. TCanvas uses this count to determine when the overall painting operation begins and ends, so that it can initialize and finalize the process with the underlying widget.


TCanvas.TextAlign
 CLX Reference

TCanvas.TextAlign

TCanvas

Specifies how the text is aligned.

type TTextAlign = (taTop, taBottom);

property TextAlign: TTextAlign;

Description

Read TextAlign to find out whether the text is aligned on the (taTop) or the bottom (taBottom) of the window. Write TextAlign to set the alignment on the top or bottom.


 CLX Reference

TCanvas events

TCanvas	Alphabetically	Legend

In TCanvas

OnChange

OnChanging


 CLX Reference

TCanvas events

TCanvas	By object	Legend

OnChange

OnChanging


TCanvas.OnChange
 CLX 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
 CLX 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.


 CLX Reference

TCanvas methods

TCanvas	Alphabetically	Legend

In TCanvas

Arc

Chord

CopyRect

Create

Destroy

Draw

DrawFocusRect

DrawPoint

DrawPoints

Ellipse

FillRect

GetClipRegion

LineTo

Lock

MoveTo

Pie

PolyBezier

PolyBezierTo

Polygon

Polyline

Rectangle

Refresh

ReleaseHandle

ResetClipRegion

RoundRect

SetClipRect

Start

Stop

StretchDraw

TextExtent

TextHeight

TextOut

TextRect

TextWidth

TiledDraw

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


 CLX Reference

TCanvas methods

TCanvas	By object	Legend

AfterConstruction

Arc

Assign

BeforeDestruction

Chord

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyRect

Create

DefaultHandler

Destroy

Dispatch

Draw

DrawFocusRect

DrawPoint

DrawPoints

Ellipse

FieldAddress

FillRect

Free

FreeInstance

GetClipRegion

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LineTo

Lock

MethodAddress

MethodName

MoveTo

NewInstance

Pie

PolyBezier

PolyBezierTo

Polygon

Polyline

Rectangle

Refresh

ReleaseHandle

ResetClipRegion

RoundRect

SafeCallException

SetClipRect

Start

Stop

StretchDraw

TextExtent

TextHeight

TextOut

TextRect

TextWidth

TiledDraw

TryLock

Unlock


TCanvas.Arc
 CLX 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); overload;

procedure Arc(X, Y, W, H, Angle, AngleLength: Integer); overload;

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).

Use the second syntax to draw an arc defined by the rectangle (X,Y,W,H), the start angle Angle and the arc length AngleLength.

The angles Angle and AngleLength are 1/16th of a degree. For example, a full circle equals 5760 (16*360). Positive values of Angle and AngleLength mean counter-clockwise while negative values mean clockwise direction. Zero degrees is at the 3'o clock position.

Note:	If you are developing a cross platform application and also targeting Windows 95, the sums X1 + X2 and Y1 + Y2 cannot exceed 32768. Also, the sum X1 + X2 + Y1 + Y2 cannot exceed 32768.


TCanvas.Chord
 CLX 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); overload;

procedure Chord(X, Y, W, H, Angle, AngleLength: Integer); overload;

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.

Use the second form of Chord to draw an chord defined by the rectangle (X,Y,W,H), the start angle Angle and the arc length AngleLength.

The angles Angle and AngleLength are 1/16th of a degree. For example, a full circle equals 5760 (16*360). Positive values of Angle and AngleLength mean counter-clockwise while negative values mean clockwise direction. Zero degrees is at the 3'o clock position.

Note:	If you are developing a cross platform application and also targeting Windows 95, the sums X1 + X2 and Y1 + Y2 cannot exceed 32768. Also, the sum X1 + X2 + Y1 + Y2 cannot exceed 32768.


TCanvas.CopyRect
 CLX Reference

TCanvas.CopyRect

TCanvas	See also

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
 CLX Reference

 TCanvas.Create

TCanvas	See also

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
 CLX 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
 CLX 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
 CLX 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.DrawPoint
 CLX Reference

TCanvas.DrawPoint

TCanvas 	See also

Draws a point on the canvas.

procedure DrawPoint(X, Y: Integer;

procedure DrawPoint(const Point: TPoint);

Description

Use the first form of DrawPoint to draw a point on the canvas at the location given by the coordinates (X, Y).

The second form of DrawPoint draws a point on the canvas at the location given by the x and y data members of a TPoint structure.

The point is drawn using the currently selected pen's color.


TCanvas.DrawPoints
 CLX Reference

TCanvas.DrawPoints

TCanvas 	See also

Draws a series of points on the canvas.

procedure DrawPoints(const Points: array ofTPoint;

Description

Use DrawPoints to draw a series of points on the canvas at the locations specified by each TPoint structure in the given array. The points are drawn using the currently selected pen's color.


TCanvas.Ellipse
 CLX 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.


TCanvas.FillRect
 CLX 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.GetClipRegion
 CLX Reference

TCanvas.GetClipRegion

TCanvas	See also

Returns the handle to the currently selected clipping region for the canvas.

function GetClipRegion QRegionH;

Description

Call GetClipRegion to return a handle to the currently selected clipping region. This handle can be used when making low-level function calls into the Qt shared libraries, where the function call requires an instance pointer to a QRegion object.

Note:	The region returned uses physical device coordinates and is not subject to any coordinate transformations.


TCanvas.LineTo
 CLX 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, and 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
 CLX 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
 CLX 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
 CLX 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);overload;

procedure Pie(X, Y, W, H, Angle, AngleLength: Integer); overload;

Description

Use Pie to draw a pie-shaped wedge on the image. In the first form of Pie, 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).

Use the second form of Pie to draw a wedge that is defined by the ellipse bounded by the rectangle (X,Y,W,H), the start angle Angle and the arc length AngleLength.

The angles Angle and AngleLength are 1/16th of a degree. For example, a full circle equals 5760 (16*360). Positive values of Angle and AngleLength mean counter-clockwise while negative values mean clockwise direction. Zero degrees is at the 3'o clock position.

The wedge is outlined using Pen, and filled using Brush.


TCanvas.PolyBezier
 CLX Reference

TCanvas.PolyBezier

TCanvas	See also

Draws a Bézier curve.

procedure PolyBezier(const Points: array ofTPoint; StartIndex: Integer=0);

Description

Use PolyBezier to draw a single cubic Bézier curve using the endpoints and control points specified by the Points parameter. The curve is drawn starting at the point identified by the StartIndex parameter, using the next two points as control points, and ending at the fourth point.

The Points parameter gives the points to use when generating the Bézier curve.

The StartIndex parameter is the index of the point to use as the starting point of the curve.

This procedure draws lines by using the current pen.

Control points after a[StartIndex+3] are ignored. Nothing happens if there aren't enough control points.


TCanvas.PolyBezierTo
 CLX Reference

TCanvas.PolyBezierTo

TCanvas	See also

Draws a Bézier curve and updates the value of PenPos.

procedure PolyBezierTo(const Points: array ofTPoint; StartIndex:Integer=0);

Description

Use PolyBezierTo to draw a single cubic Bézier curve using the endpoints and control points specified by the Points parameter. The curve is drawn starting at the point identified by the StartIndex parameter, using the next two points as control points, and ending at the fourth point.

The Points parameter gives the points to use when generating the Bézier curve.

The StartIndex parameter is the index of the point to use as the starting point of the curve.

This procedure draws lines by using the current pen and updates the value of PenPos to the value of the last point in the Points array (even if this is not the endpoint of the curve).


TCanvas.Polygon
 CLX 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(const Points: array ofTPoint; Winding: Boolean = False; StartIndex: Integer = 0; NumPts: Integer = -1);

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.

Winding determines how the polygon is filled. When Winding is True, Polygon fills the shape using the Winding fill algorithm. When Winding is False, Polygon uses the even-odd (alternative) fill algorithm.

StartIndex gives the index of the first point in the array to use. All points before this are ignored.

NumPts indicates the number of points to use, starting at StartIndex. If NumPts is –1 (the default), Polygon uses all points from StartIndex to the end of the array.

The first point is always connected to the last point.

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
 CLX 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(const Points: array ofTPoint; StartIndex: Integer = 0; NumPts: Integer = -1);

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.

StartIndex identifies the first point in the array to use.

NumPts indicates the number of points to use. If NumPts is –1 (the default), PolyLine uses all the points from StartIndex to the end of the array.

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
 CLX 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 Polygon. To draw a rectangle with rounded corners, use RoundRect.


TCanvas.Refresh
 CLX Reference

TCanvas.Refresh

TCanvas	See also

Deselects the Pen, Brush, and Font from the painter.

procedure Refresh;

Description

Call Refresh to return the painter 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 painter if it is used by the drawing method.


TCanvas.ReleaseHandle
 CLX Reference

TCanvas.ReleaseHandle

TCanvas	See also

Sets the Handle property to nil.

function ReleaseHandle: QPainterH;

Description

Call ReleaseHandle to disconnect the TCanvas object from the QPainter object it uses. ReleaseHandle sets the Handle property to nil so that the canvas can use another QPointer object, but does not free the underlying QPainter object.

ReleaseHandle returns the previous value of the Handle property.


TCanvas.ResetClipRegion
 CLX Reference

TCanvas.ResetClipRegion

TCanvas	See also

Restores the clipping region after it was temporarily altered by the SetClipRect method.

procedure ResetClipRegion;

Description

Call ResetClipRegion to restore the clipping region after temporarily restricting the drawing area by a call to the SetClipRect method.


TCanvas.RoundRect
 CLX 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.SetClipRect
 CLX Reference

TCanvas.SetClipRect

TCanvas	See also

Temporarily overrides the value of the ClipRect property.

procedure SetClipRect(const ARect: TRect);

Description

Call SetClipRect to set further restrict the canvas’s clipping rectangle. SetClipRect limits the clipping rectangle to the value of ARect. Any drawing outside the coordinates of ARect doesn’t appear in the image.

To restore the clipping region after a call to SetClipRect, call the ResetClipRegion method.


TCanvas.Start
 CLX Reference

TCanvas.Start

TCanvas	See also

Initializes the canvas for a drawing operation.

procedure Start(FreshState: Boolean = True);

Description

Every operation that paints on the canvas must begin with a call to the Start method and end with a call to the Stop method. TCanvas automatically makes these calls when you draw to the canvas using the TCanvas methods.

Each call to Start must be matched by a corresponding call to Stop when the drawing operation is complete.

FreshState indicates that the canvas should re-initialize itself before the drawing operation. That is, the canvas resets the pen, font, and brush to reflect the current Canvas properties.


TCanvas.Stop
 CLX Reference

TCanvas.Stop

TCanvas	See also

Signals the end of a drawing operation.

procedure Stop;

Description

Call Stop to signal the end of any drawing operation that you preceded by a call to the Start method.

Each call to Stop decrements the StartCount property, which was incremented by the Start method. When StartCount drops to 0, Stop releases the resources it originally allocated for the drawing operation.


TCanvas.StretchDraw
 CLX Reference

TCanvas.StretchDraw

TCanvas	See also

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.


TCanvas.TextExtent
 CLX 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: WideString; const Flags: Integer = 0): TSize; overload;

procedure TextExtent(const Text: WideString; var Rect: TRect; const Flags: Integer = 0); overload;

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.

Text is the text about which you are querying.

Rect supplies a bounding rectangle within which the text should appear. On exit, Rect is set to the bounding rectangle of where the text actually appears.

Flags indicates any special treatment that should be imposed when rendering the text. It is an integer value built by adding together zero or more of the following values:

Flag	Meaning

AlignLeft	Text is aligned to the left border. (the default alignment)

AlignRight	Text is aligned to the right border.

AlignHCenter	Text is centered horizontally.

AlignTop	Text is aligned to the top border. (the default alignment)

AlignBottom	Text is aligned to the bottom border.

AlignVCenter	Text is centered vertically.

SingleLine	The canvas ignores newline characters in the text.

ExpandTabs	Tab characters are converted to spaces.

ShowPrefix	Characters preceded by an ampersand (&) appear underlined.

WordBreak	Soft linebreaks are added to fit the text into the bounding rectangle specified by Rect.

Note:	If Flags contains contradictory values (such as AlignLeft and AlignRight), the result is undefined.

Using the first syntax, TextExtent returns the dimensions required to render the text. Using the second syntax, the bounds for the rendered text are returned in Rect.

To check only the height, call TextHeight. To check only the width, call TextWidth.


TCanvas.TextHeight
 CLX Reference

TCanvas.TextHeight

TCanvas	See also 	Example

Returns the height, in pixels, of a string rendered in the current font.

function TextHeight(const Text: WideString): 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
 CLX 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: WideString);

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.

Note:	TextOut does not erase the background before writing Text. To erase the background first, use the FillRect method.


TCanvas.TextRect
 CLX Reference

TCanvas.TextRect

TCanvas	See also 	Example

Writes a string inside a clipping rectangle.

procedure TextRect(Rect: TRect; X, Y: Integer; const Text: WideString; TextFlags: Integer = 0);

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).

The TextFlags parameter specifies how the text should be aligned within the rectangle. It is an integer built by adding a horizontal and a vertical alignment flag. The alignment flags are as follows:

Flag	Type	Meaning

AlignLeft	Horizontal	Align text to the left edge of the rectangle.

AlignRight	Horizontal	Align text to the right edge of the rectangle.

AlignHCenter	Horizontal	Center text horizontally in the rectangle.

AlignTop	Vertical	Align text to the top edge of the rectangle.

AlignBottom	Vertical	Align text to the bottom edge of the rectangle.

AlignVCenter	Vertical	Center text vertically in the rectangle.

You can also use the AlignCenter flag to indicate AlignHCenter + AlignVCenter.


TCanvas.TextWidth
 CLX Reference

TCanvas.TextWidth

TCanvas	See also 	Example

Returns the width, in pixels, of a string rendered in the current font.

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.TiledDraw
 CLX Reference

TCanvas.::TiledDraw

TCanvas	See also

Convers the surface of a rectangle with tiled images of a specified graphic.

procedure TiledDraw(const Rect: TRect; Graphic: TGraphic);

Description

Use TiledDraw to tile the Graphic into the region specified by Rect on the surface of the canvas.


TCanvas.TryLock
 CLX 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
 CLX 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
 CLX Reference

 TCheckBox

Hierarchy	Properties	Methods	Events	Using TCheckBox	See also

TCheckBox represents a check box that can be on (checked) or off (unchecked)

Unit

QStdCtrls

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.


 CLX Reference

TCheckBox properties

TCheckBox	Alphabetically	Legend

Derived from TCustomCheckBox

AllowGrayed

Checked

Handle

State

Derived from TButtonControl

Caption

Derived from TWidgetControl

Bitmap

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Masked

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCheckBox Properties

TCheckBox	By Object	Legend

Action

Align

AllowGrayed

Anchors

Bitmap

BoundsRect

Brush

Caption

Checked

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Masked

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ShowHint

Showing

State

TabOrder

TabStop

Tag

Top

Visible

Width


 CLX Reference

TCheckBox events

TCheckBox	Alphabetically	Legend

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TCheckBox Events

TCheckBox	By Object	Legend

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TCheckBox methods

TCheckBox	Alphabetically	Legend

Derived from TCustomCheckBox

Create

Toggle

Derived from TButtonControl

AccelChar

AnimateClick

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCheckBox Methods

TCheckBox	By Object	Legend

AccelChar

AfterConstruction

AnimateClick

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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Toggle

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TButtonControl

TCustomCheckBox

TCheckBox


TChangeLink
 CLX 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

QImgList

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.


 CLX Reference

TChangeLink properties

TChangeLink	Alphabetically	Legend

In TChangeLink

Sender


 CLX Reference

TChangeLink properties

TChangeLink	By object	Legend

Sender


TChangeLink.Sender
 CLX 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.


 CLX Reference

TChangeLink events

TChangeLink	Alphabetically	Legend

In TChangeLink

OnChange


 CLX Reference

TChangeLink events

TChangeLink	By object	Legend

OnChange


TChangeLink.OnChange
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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


TCheckListBox
 CLX Reference

 TCheckListBox

Hierarchy	Properties	Methods	Events	Using TCheckListBox	See also

TCheckListBox displays a scrollable list with check boxes next to each item.

Unit

QCheckLst

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.


 CLX Reference

TCheckListBox properties

TCheckListBox	Alphabetically	Legend

In TCheckListBox

AllowGrayed

Checked

Flat

ItemEnabled

State

Derived from TCustomListBox

Canvas

ChildHandle

ColumnLayout

Columns

Handle

ItemHeight

ItemIndex

Items

RowLayout

Rows

SelCount

Selected

Sorted

Style

TopIndex

Derived from TFrameControl

BorderStyle

Derived from TWidgetControl

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCheckListBox properties

TCheckListBox	By object	Legend

Action

Align

AllowGrayed

Anchors

BorderStyle

BoundsRect

Brush

Canvas

Checked

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ColumnLayout

Columns

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Flat

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

ItemEnabled

ItemHeight

ItemIndex

Items

Left

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

RowLayout

Rows

SelCount

Selected

ShowHint

Showing

Sorted

State

Style

TabOrder

TabStop

Tag

Top

TopIndex

Visible

Width


TCheckListBox.AllowGrayed
 CLX 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
 CLX 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
 CLX 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.ItemEnabled
 CLX 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
 CLX 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.)


 CLX Reference

TCheckListBox events

TCheckListBox	Alphabetically	Legend

In TCheckListBox

OnClickCheck

Derived from TCustomListBox

OnDrawItem

OnMeasureItem

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TCheckListBox events

TCheckListBox	By object	Legend

OnClick

OnClickCheck

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDrawItem

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMeasureItem

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


TCheckListBox.OnClickCheck
 CLX 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).


 CLX Reference

TCheckListBox methods

TCheckListBox	Alphabetically	Legend

In TCheckListBox

Destroy

Derived from TCustomListBox

Clear

ClearSelection

Create

ItemAtPos

ItemRect

ItemVisible

MakeCurrentVisible

Sort

Update

VisibleItemCount

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCheckListBox methods

TCheckListBox	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

ItemAtPos

ItemRect

ItemVisible

MakeCurrentVisible

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Sort

Update

UpdateAction

UpdateControlState

VisibleItemCount


TCheckListBox.Destroy
 CLX 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

TWidgetControl

TFrameControl

TCustomListBox

TCheckListBox


TClassList
 CLX 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.


 CLX Reference

TClassList properties

TClassList	Alphabetically	Legend

In TClassList

Items

Derived from TList

Capacity

Count

List


 CLX Reference

TClassList properties

TClassList	By object	Legend

Capacity

Count

Items

List


TClassList.Items
 CLX 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.


 CLX Reference

TClassList methods

TClassList	Alphabetically	Legend

In TClassList

Add

IndexOf

Insert

Remove

Derived from TList

Assign

Clear

Delete

Destroy

Error

Exchange

Expand

Extract

First

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


 CLX 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
 CLX 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.IndexOf
 CLX 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
 CLX 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.Remove
 CLX 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
 CLX Reference

TClipboard

Hierarchy	Properties	Methods	Using TClipboard	See also

TClipboard represents the system clipboard.

Unit

QClipbrd

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 QClipbrd unit.

TClipboard’s methods

store and retrieve data in appropriate formats.

manage formats for objects in the clipboard.

Data that is stored on the clipboard is stored as a mime type with an associated TStream object. CLX provides the following predefined mime source and mime type string constants for the specified CLX objects:

TBitmap = 'image/delphi.bitmap'

TComponent = 'application/delphi.component'

TPicture = 'image/delphi.picture'

TDrawing = 'image/delphi.drawing'


 CLX Reference

TClipboard properties

TClipboard	Alphabetically	Legend

In TClipboard

AsText

Handle


 CLX Reference

TClipboard properties

TClipboard	By object	Legend

AsText

Handle


TClipboard.AsText
 CLX Reference

TClipboard.AsText

TClipboard

Represents the contents of the clipboard as a string.

property AsText: WideString;

Description

Use the AsText property to place text in and retrieve text from the clipboard. If the clipboard does not contain any text, AsText returns a null string. Text that is placed on the clipboard has a mime type of 'text' or 'text/plain'.


TClipboard.Handle
 CLX Reference

TClipboard::.Handle

TClipboard	See also

Returns a unique 4-byte identifier that represents the instance of the underlying Qt QClipboard object for the application.

property Handle: QClipboardH;

Description

Use Handle to obtain the handle for the underlying QClipboard object. This Handle can be used when making low-level function calls into the QT shared libraries, where the function call requires an instance pointer to a QClipboard object.


 CLX Reference

TClipboard methods

TClipboard	Alphabetically	Legend

In TClipboard

AddFormat

Assign

Clear

GetComponent

GetFormat

Provides

RegisterClipboardFormat

SetComponent

SetFormat

SupportedFormats

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


 CLX Reference

TClipboard methods

TClipboard	By object	Legend

AddFormat

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetComponent

GetFormat

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Provides

RegisterClipboardFormat

SafeCallException

SetComponent

SetFormat

SupportedFormats


TClipboard.AddFormat
 CLX Reference

TClipboardAddFormat

TClipboard	See also

Appends a data stream to the clipboard.

procedure AddFormat(const Format: string; Stream: TStream);

Description

Use AddFormat to add data to the clipboard.

Format is the mime type of the data in the stream.

Stream is a TStream descendant that writes the data to be added to the clipboard.

Note:	Unlike the SetFormat method, which replaces the contents of the clipboard, AddFormat simply writes its data to the clipboard without clearing the current contents.


TClipboard.Assign
 CLX Reference

TClipboard.Assign

TClipboard	See also

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 SupportedFormats method returns a string list containing the formats of all the current mime types available from the clipboard. Different kinds of graphic objects (such as bitmaps and drawings) have their own formats. Use the Provides 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
 CLX 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.GetComponent
 CLX 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.GetFormat
 CLX Reference

TClipboardGetFormat

TClipboard	See also

Retrieves a data stream from the clipboard.

function GetFormat(const Format: string; Stream: TStream): Boolean;

Description

Use GetFormat to retrieve a data stream that is stored on the clipboard.

Format is the mime type to be returned.

Stream is a TStream descendant that receives the data from the clipboard.


TClipboard.Provides
 CLX Reference

TClipboardProvides

TClipboard	See also

Indicates whether a specified mime type is currently on the clipboard.

function Provides(const Format: string): Boolean;

Description

Use Provides to determine whether the mime type specified by the Format parameter is currently on the clipboard. Format should be in the form of mime type/sub-type, for example:

with Clipboard do

  if Provides('text/plain') then

    Memo1.Text := AsText;

CLX provides the following predefined mime source and mime type string constants for the following CLX objects:

TBitmap = 'image/delphi.bitmap'

TComponent = 'application/delphi.component'

TPicture = 'image/delphi.picture'

TDrawing = 'image/delphi.drawing'

In addition, the clipboard supports the following predefined mime types:

text/plain

text/utf16

text/utf8

To determine all the mime types that are currently on the clipboard, use the SupportedFormats method.


TClipboard.RegisterClipboardFormat
 CLX Reference

TClipboardRegisterClipboardFormat

TClipboard

Registers a clipboard format with the Windows clipboard.

function RegisterClipboardFormat(const Format: string): Integer;

Description

When developing cross-platform applications and the target is Win32, use RegisterClipboardFormat to register a new mime type with the Windows clipboard. The Format parameter specifies the mime type to register.

RegisterClipboardFormat returns an integer that represents the Windows clipboard format for that mime type.

Note: In Linux, this method just returns -1.


TClipboard.SetComponent
 CLX 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.SetFormat
 CLX Reference

TClipboardSetFormat

TClipboard	See also

Writes a data stream to the clipboard.

procedure SetFormat(const Format: string; Stream: TStream);

Description

Use SetFormat to write a data to the clipboard.

Format is the mime type of the data in the stream.

Stream is a TStream descendant that writes the data to be placed on the clipboard.


TClipboard.SupportedFormats
 CLX Reference

TClipboardSupportedFormats

TClipboard	See also

Fills a list with all the mime types currently contained on the clipboard.

procedure SupportedFormats(List: TStrings);

Description

Use SupportedFormats to fill a string list, specified by the List parameter, with all the mime types currently contained on the clipboard. To find out if a specific mime type is currently on the clipboard, use the Provides method.


Hierarchy

TObject

TPersistent

TClipboard


TClxMimeSource
 CLX Reference

TClxMimeSource

Hierarchy	Properties	Methods

TClxMimeSource lets you read data from and write data to a QClxMimeSource object.

Unit

QTypes

Description

Use TClxMimeSource to read data from and write data to a Qt mime source. A mime source represents a stream of data, which it can supply in one or more MIME encodings.

To assign data to the mime source, use the LoadFromStream method. To read data from the mime source, use the SaveToStream method. A mime source can potentially write its data in a variety of MIME formats. To determine what formats are available for writing the data that is currently in the mime source object, call the Provides or SupportedFormats method.


 CLX Reference

TClxMimeSource properties

TClxMimeSource	Alphabetically	Legend

In TClxMimeSource

Handle


 CLX Reference

TClxMimeSource properties

TClxMimeSource	By object	Legend

Handle


TClxMimeSource.Handle
 CLX Reference

TClxMimeSource.Handle

TClxMimeSource	See also

Specifies the unique 4-byte identifier that represents the instance of a QClxMimeSource object.

property Handle: QClxMimeSourceH;

Description

The Handle property is a unique 4-byte identifier that represents the instance of a QClxMimeSource object.

Use Handle to obtain a pointer to the instance of the underlying QClxMimeSource object.

Set Handle to make the TClxMimeSource object represent an existing QClxMimeSource object. Setting Handle releases the current QClxMimeSource object. If the handle to the QClxMimeSource object was owned by the TClxMimeSource object, the QClxMimeSource object is destroyed. Setting Handle does not automatically assume ownership of the QClxMimeSource object. To assume ownership, call OwnHandle after setting the Handle.

Note:	If you do not assign Handle, TClxMimeSource automatically creates a new, empty QClxMimeSource instance when you first read the Handle property. You can then assign data to that object by calling the LoadFromStream method.


 CLX Reference

TClxMimeSource methods

TClxMimeSource	Alphabetically	Legend

In TClxMimeSource

Create

LoadFromStream

Derived from TMimeSource

Destroy

OwnHandle

Provides

ReleaseHandle

SaveToStream

SupportedFormats

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


 CLX Reference

TClxMimeSource methods

TClxMimeSource	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

LoadFromStream

MethodAddress

MethodName

NewInstance

OwnHandle

Provides

ReleaseHandle

SafeCallException

SaveToStream

SupportedFormats


TClxMimeSource.Create
 CLX Reference

TClxMimeSource.Create

TClxMimeSource	See also

Instantiates and initializes a TClxMimeSource object.

constructor Create(MimeSourceH: QClxMimeSourceH); overload;

constructor Create(const Format: string; Data: TStream); overload;

Description

Call Create to create a TClxMimeSource object.

MimeSourceH is the handle to an existing TClxMimeSource object whose data the TClxMimeSource object represents. If you specify nil, TClxMimeSource creates a new, empty QClxMimeSource object.

Format and Data supply the data for the mime source. Format is a MIME-type description such as ’text/plain’, which indicates how the Data parameter stores its data. Data is a stream that supplies the data for the new TClxMimeSource object.

Note:	This underlying QClxMimeSource object is not owned by the TClxMimeSource instance (even if you do not supply a handle to the constructor and the mime source creates a new QClxMimeSource instance). When the QClxMimeSource object is not owned, it is not freed when you free the TClxMimeSource object. To convert this to an owned object (one that is freed when you free the TClxMimeSource instance), call the OwnHandle method.


TClxMimeSource.LoadFromStream
 CLX Reference

TClxMimeSource.LoadFromStream

TClxMimeSource	See also

Supplies data from a stream to the mime source.

procedure LoadFromStream(Stream: TStream; const Format: string): Boolean;

Description

Call LoadFromStream to write data to the mime source. LoadFromStream adds this data and format to the possible formats in which the mime source can write its data.

Stream is a TStream descendant that contains the data to write.

Format is a MIME-type descriptor that indicates the format of the data in Stream. When next you call the SaveToStream method, specifying Format as the format, the mime source writes the value that is currently in Stream.


Hierarchy

TObject

TPersistent

TMimeSource

TClxMimeSource


TComponentList
 CLX 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.


 CLX Reference

TComponentList properties

TComponentList	Alphabetically	Legend

In TComponentList

Items

Derived from TObjectList

OwnsObjects

Derived from TList

Capacity

Count

List


 CLX Reference

TComponentList properties

TComponentList	By object	Legend

Capacity

Count

Items

List

OwnsObjects


TComponentList.Items
 CLX 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.


 CLX Reference

TComponentList methods

TComponentList	Alphabetically	Legend

In TComponentList

Add

Destroy

IndexOf

Insert

Remove

Derived from TObjectList

Create

FindInstanceOf

Derived from TList

Assign

Clear

Delete

Error

Exchange

Expand

Extract

First

Last

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


 CLX 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
 CLX 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.Add
 CLX 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.IndexOf
 CLX 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
 CLX 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.Remove
 CLX 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
 CLX 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.

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.


 CLX Reference

TComponent properties

TComponent	Alphabetically	Legend

In TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TComponent properties

TComponent	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


TComponent.ComponentCount
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.  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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TComponent methods

TComponent	Alphabetically	Legend

In TComponent

_AddRef

_Release

BeforeDestruction

ChangeName

Create

DefineProperties

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetChildOwner

GetChildParent

GetChildren

GetNamePath

GetOwner

GetParentComponent

HasParent

InsertComponent

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


 CLX 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

GetChildOwner

GetChildParent

GetChildren

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetOwner

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.GetChildOwner
 CLX 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
 CLX 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
 CLX 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.GetNamePath
 CLX 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
 CLX 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
 CLX 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.HasParent
 CLX 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
 CLX 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.IsImplementorOf
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TComponent.ReadState
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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. Although CLX does not support COM, SafeCallException is introduced to handle exceptions that arise using the safecall calling convention. SafeCallException always returns E_UNEXPECTED. This is a default return value that is appropriate for classes that do not support any interfaces.


TComponent.SetAncestor
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TComponent.UpdateRegistry

TComponent

Acts as a placeholder for compatibility with Windows-based components.

classprocedure UpdateRegistry(Register: Boolean; const ClassID, ProgID: string); virtual;

Description

Do not call UpdateRegistry directly. It is for internal use only.


TComponent.Updating
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TComponent._AddRef

TComponent	See also

Called when an application uses a component interface.

function _AddRef: Integer; stdcall;

Description

_AddRef implements the IInterface method, AddRef.As implemented in TComponent, _AddRef always returns –1.  Descendant classes can override this method to perform reference counting on the use of the component’s interfaces.


TComponent._Release
 CLX Reference

TComponent._Release

TComponent	See also

Called when an application releases a component interface.

function _Release: Integer; stdcall;

Description

_Release implements the IInterface interface method, Release.As implemented in TComponent, _Release always returns –1.  Descendant classes can override this method to perform reference counting on the use of the component’s interfaces.


Hierarchy

TObject

TPersistent

TComponent


TContainedAction
 CLX 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.

Unit

QActnList

Description

TContainedAction introduces properties and methods that enable actions to appear in an action list. The properties of TContainedAction contain information about the relationship between the action and its action list. Methods of TContainedAction override those of the base class to take into account the action list 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.


 CLX Reference

TContainedAction properties

TContainedAction	Alphabetically	Legend

In TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TContainedAction properties

TContainedAction	By object	Legend

ActionComponent

ActionList

Category

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Index

Name

Owner

Tag


TContainedAction.ActionList
 CLX Reference

TContainedAction.ActionList

TContainedAction	See also

Indicates the action list that contains the action.

property ActionList: TCustomActionList;

Description

ActionList indicates which action list contains the action. Only contained actions (instances of TContainedAction or its descendants) can appear in an action list. An action list provides a visual interface for working with actions, which are then available to be associated with client controls in the application.

When creating an action dynamically at runtime, set the ActionList property to add the action to an action list.


TContainedAction.Category
 CLX Reference

TContainedAction.Category

TContainedAction	See also

Specifies the category under which the action appears in its action list.

property Category: String;

Description

Category is the group, or category, to which the action belongs. An action list displays its actions grouped by category.

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, and choosing Category in the Object Inspector.


TContainedAction.Index
 CLX Reference

TContainedAction.Index

TContainedAction	See also

Specifies the index of the action in its action list.

property Index: Integer;

Description

Index indicates the position of the action in its action list. You can change an action’s Index at design time by dragging it to a new position in the action list editor.


 CLX Reference

TContainedAction events

TContainedAction	Alphabetically	Legend

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TContainedAction events

TContainedAction	By object	Legend

OnExecute

OnUpdate


 CLX 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

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX Reference

TContainedAction.Destroy

TContainedAction

Destroys the instance of the contained action.

destructor Destroy; override;

Description

If the action is contained in an action list, Destroy removes the action from that list. Then it calls the inheritedDestroy.


TContainedAction.Execute
 CLX 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
 CLX Reference

TContainedAction.GetParentComponent

TContainedAction	See also

Returns the action list 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 as the action’s parent.


TContainedAction.HasParent
 CLX Reference

TContainedAction.HasParent

TContainedAction	See also

Indicates whether the action is contained in an action list.

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.


TContainedAction.Update
 CLX 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
 CLX 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
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
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.


 CLX Reference

TCollection properties

TCollection	Alphabetically	Legend

In TCollection

Count

ItemClass

Items

NextID

PropName

UpdateCount


 CLX Reference

TCollection properties

TCollection	By object	Legend

Count

ItemClass

Items

NextID

PropName

UpdateCount


TCollection.Count
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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

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

SafeCallException


 CLX 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

Owner

SafeCallException

SetItem

SetItemName

Update


TCollection.Add
 CLX 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
 CLX Reference

TCollection.Added

TCollection	See also

Responds when items are added to the collection.

procedure Added(var Item: TCollectionItem); virtual;

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.

As implemented in TCollection, Added does nothing. Descendant classes override this method to initialize newly added collection items before the Add method returns them.


TCollection.Assign
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TCollection.Deleting

TCollection	See also

Responds when items are deleted from the collection.

procedure Deleting(Item: TCollectionItem); virtual;

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.

As implemented in TCollection, Deleting does nothing. Descendant classes override Deleting to perform any final cleanup before an item is removed from the collection.


TCollection.Destroy
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.Owner
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TCollectionItem properties

TCollectionItem	Alphabetically	Legend

In TCollectionItem

Collection

DisplayName

ID

Index


 CLX Reference

TCollectionItem properties

TCollectionItem	By object	Legend

Collection

DisplayName

ID

Index


TCollectionItem.Collection
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TColorDialog
 CLX Reference

 TColorDialog

Hierarchy	Properties	Methods

TColorDialog displays a modal color-selection dialog.

Unit

QDialogs

 Description

The TColorDialog component displays a 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.


 CLX Reference

TColorDialog properties

TColorDialog	Alphabetically	Legend

In TColorDialog

Color

CustomColors

Derived from TQtDialog

Handle

NativeFlags

UseNativeDialog

Derived from TDialog

Height

HelpContext

HelpKeyword

HelpType

Position

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TColorDialog properties

TColorDialog	By object	Legend

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

CustomColors

DesignInfo

Handle

Height

HelpContext

HelpKeyword

HelpType

Name

NativeFlags

Owner

Position

Tag

UseNativeDialog

Width


TColorDialog.Color
 CLX 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
 CLX 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.


 CLX Reference

TColorDialog methods

TColorDialog	Alphabetically	Legend

In TColorDialog

Create

Destroy

In TQtDialog

Execute

HandleAllocated

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleAllocated

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TColorDialog.Create
 CLX 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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TDialog

TQtDialog

TColorDialog


TComboBox
 CLX Reference

 TComboBox

Hierarchy	Properties	Methods	Events	Using TComboBox	See also

TComboBox combines an edit box with a scrollable list.

Unit

QStdCtrls

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.


 CLX Reference

TComboBox properties

TComboBox	Alphabetically	Legend

Derived from TCustomComboBox

AutoComplete

Canvas

CharCase

DropDownCount

DroppedDown

Duplicates

Handle

InsertMode

ItemHeight

ItemIndex

Items

MaxItems

MaxLength

SelLength

SelStart

SelText

Sorted

Style

Text

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TComboBox Properties

TComboBox	By Object	Legend

Action

Align

Anchors

AutoComplete

BoundsRect

Brush

Canvas

CharCase

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

DropDownCount

DroppedDown

Duplicates

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

InsertMode

ItemHeight

ItemIndex

Items

Left

MaxItems

MaxLength

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

SelLength

SelStart

SelText

ShowHint

Showing

Sorted

Style

TabOrder

TabStop

Tag

Text

Top

Visible

Width


 CLX Reference

TComboBox events

TComboBox	Alphabetically	Legend

Derived from TCustomComboBox

OnChange

OnCloseUp

OnDrawItem

OnDropDown

OnHighlighted

OnMeasureItem

OnSelect

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnStartDrag


 CLX Reference

TComboBox Events

TComboBox	By Object	Legend

OnChange

OnClick

OnCloseUp

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDrawItem

OnDropDown

OnEndDrag

OnEnter

OnExit

OnHighlighted

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMeasureItem

OnSelect

OnStartDrag


 CLX Reference

TComboBox methods

TComboBox	Alphabetically	Legend

Derived from TCustomComboBox

Clear

Create

Destroy

Focused

SelectAll

SetBounds

Sort

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TComboBox Methods

TComboBox	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Sort

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomComboBox

TComboBox


TComponentEditor
 CLX 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.


 CLX Reference

TComponentEditor properties

TComponentEditor	Alphabetically 	Legend

In TComponentEditor

Component

Designer

Derived from TInterfacedObject

RefCount


 CLX Reference

TComponentEditor properties

TComponentEditor	By object 	Legend

Component

Designer

RefCount


TComponentEditor.Component
 CLX Reference

TComponentEditor.Component

TComponentEditor 	See also

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
 CLX 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.


 CLX Reference

TComponentEditor methods

TComponentEditor	Alphabetically	Legend

In TComponentEditor

Copy

Create

Edit

ExecuteVerb

GetComponent

GetDesigner

GetVerb

GetVerbCount

IsInInlined

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


 CLX 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

SafeCallException


TComponentEditor.Copy
 CLX Reference

TComponentEditor.Copy

TComponentEditor	See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


Hierarchy

TObject

TInterfacedObject

TBaseComponentEditor

TComponentEditor


TControl
 CLX Reference

TControl

Hierarchy	Properties	Methods	Events	See also

TControl is the base class for all components that are visible at runtime.

Unit

QControls

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.


 CLX Reference

TControl Properties

TControl	Alphabetically	Legend

In TControl

Action

ActionLink

Align

Anchors

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

DragObject

Enabled

Font

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

Left

MouseCapture

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ScalingFlags

ShowHint

Text

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TControl Properties

TControl	By Object	Legend

Action

ActionLink

Align

Anchors

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

DragObject

Enabled

Font

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

Left

MouseCapture

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ScalingFlags

ShowHint

Tag

Text

Top

Visible

Width


TControl.Action
 CLX 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
 CLX 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
 CLX Reference

TControl.Align

TControl	See also

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
 CLX 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.BoundsRect
 CLX Reference

TControl.BoundsRect

TControl	See also

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
 CLX 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
 CLX 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
 CLX 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 TWidgetControl 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
 CLX Reference

TControl.ClientRect

TControl	See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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, csRecreating, csWidgetPainting);

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  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.

csRecreating	The underlying Qt widget is being recreated, usually as the result of a property change. See TWidgetControl.RecreateWidget.

csWidgetPainting	The underlying Qt is repainting. See TWidgetControl.Painting.

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
 CLX 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, 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 (grabs) 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.

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 [csClickEvents, csSetCaption, csDoubleClicks].

ControlStyle is primarily used by component writers when implementing components derived from TControl.


TControl.Cursor
 CLX Reference

TControl.Cursor

TControl	See also

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.DragMode
 CLX 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.DragObject
 CLX Reference

TControl.DragObject

TControl)

Returns drag object for control.

property DragObject: TDragObject;

Description

DragObject returns the drag object associated with the control. This read-only protected property is used by component designers only.


TControl.Enabled
 CLX 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.Font
 CLX 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
 CLX Reference

TControl.Height

TControl	See also

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
 CLX 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. For controls derived from TGraphicControl, this means there is no context-sensitive help for the control. For controls derived from TWidgetControl, a 0 ID mean that the help system should refer to the parent control, if there is one, for a help topic; see TWidgetControl.InvokeHelp for more information.


TControl.HelpFile
 CLX Reference

TControl.HelpFile

TControl

Specifies the help file used for context-sensitive help..

property HelpFile: string;

Description

HelpFile is defined in descendent classes that support control-specific help files. Most control classes simply use the value specified in TApplication.HelpFile.


TControl.HelpKeyword
 CLX 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. For controls derived from TGraphicControl, this means there is no context-sensitive help for the control. For controls derived from TWidgetControl, a missing keyword mean that the help system should refer to the parent control, if there is one, for a help topic; see TWidgetControl.InvokeHelp for more information.


TControl.HelpType
 CLX 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
 CLX Reference

TControl.Hint

TControl	See also

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.Left
 CLX 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.MouseCapture
 CLX 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
 CLX 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
 CLX Reference

TControl.Parent

TControl	See also	Example

Indicates the parent of the control.

property Parent: TWidgetControl;

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 TWidgetControl.

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 are contained in Qt widgets rather than in a parent CLX control. For these controls, the value of Parent is nil and the ParentWidget property specifies the widget.

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.ParentColor
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.Text
 CLX 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
 CLX Reference

TControl.Top

TControl	See also

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.Visible
 CLX Reference

TControl.Visible

TControl	See also

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
 CLX 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.


 CLX Reference

TControl Events

TControl	Alphabetically	Legend

In TControl

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize

OnStartDrag


 CLX Reference

TControl Events

TControl	By Object	Legend

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize

OnStartDrag


TControl.OnClick
 CLX Reference

TControl.OnClick

TControl	See also

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.

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
 CLX 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.


TControl.OnContextPopup
 CLX 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 the user clicking the right mouse button.

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
 CLX 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
 CLX 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
 CLX 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.OnEndDrag
 CLX 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
 CLX Reference

TControl.OnMouseDown

TControl	See also

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
 CLX Reference

TControl.OnMouseMove

TControl	See also

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
 CLX Reference

TControl.OnMouseUp

TControl	See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 OnConstrainedResize.

Note:	Some controls call this event handler when the control is first created.


TControl.OnStartDrag
 CLX 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 TDragControlObject instance for the DragObject parameter to specify the drag cursor, or, optionally, a drag image list. If you create 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 TMemo, the underlying widget handles internal drag operations. For these controls, there are no OnStartDrag or OnEndDrag events for drag operations within the control.


 CLX Reference

TControl Methods

TControl	Alphabetically	Legend

In TControl

ActionChange

AdjustPainter

AdjustSize

AfterConstruction

BeginAutoDrag

BeginDrag

BoundsChanged

BringToFront

ChangeBounds

ChangeScale

Click

ClientToParent

ClientToScreen

ColorChanged

ConstrainedResize

ControlsAligned

Create

CursorChanged

DblClick

Destroy

DoContextPopup

DoEndDrag

DoMouseWheel

DoMouseWheelDown

DoMouseWheelUp

DoStartDrag

DragCanceled

DragDrop

Dragging

DragOver

EnabledChanged

EndDrag

FontChanged

GetActionLinkClass

GetAlignedPaintDevice

GetClientOrigin

GetClientRect

GetDragImageHotSpot

GetDragImageIndex

GetEnabled

GetPaintDevice

GetParentComponent

GetPopupMenu

GetText

HasParent

Hide

HintShow

HintShowPause

HitTest

InitiateAction

Invalidate

Loaded

MouseDown

MouseEnter

MouseLeave

MouseMove

MouseUp

Notification

PaintRequest

ParentColorChanged

ParentFontChanged

ParentShowHintChanged

ParentToClient

ReadState

Refresh

Repaint

RequestAlign

Resize

ScreenToClient

SendToBack

SetBounds

SetColor

SetEnabled

SetName

SetParent

SetParentComponent

SetZOrder

Show

ShowHintChanged

TextChanged

Update

UpdateBoundsRect

VisibleChanged

VisibleChanging

WantKey

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TControl Methods

TControl	By Object	Legend

ActionChange

AdjustPainter

AdjustSize

AfterConstruction

Assign

BeforeDestruction

BeginAutoDrag

BeginDrag

BoundsChanged

BringToFront

ChangeBounds

ChangeScale

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

ColorChanged

ConstrainedResize

ControlsAligned

Create

CursorChanged

DblClick

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoContextPopup

DoEndDrag

DoMouseWheel

DoMouseWheelDown

DoMouseWheelUp

DoStartDrag

DragCanceled

DragDrop

Dragging

DragOver

EnabledChanged

EndDrag

ExecuteAction

FieldAddress

FindComponent

FontChanged

Free

FreeInstance

FreeNotification

GetActionLinkClass

GetAlignedPaintDevice

GetClientOrigin

GetClientRect

GetDragImageHotSpot

GetDragImageIndex

GetEnabled

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetPaintDevice

GetParentComponent

GetPopupMenu

GetText

HasParent

Hide

HintShow

HintShowPause

HitTest

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

Loaded

MethodAddress

MethodName

MouseDown

MouseEnter

MouseLeave

MouseMove

MouseUp

NewInstance

Notification

PaintRequest

ParentColorChanged

ParentFontChanged

ParentShowHintChanged

ParentToClient

ReadState

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

RequestAlign

Resize

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetColor

SetEnabled

SetName

SetParent

SetParentComponent

SetSubComponent

SetZOrder

Show

ShowHintChanged

TextChanged

Update

UpdateAction

UpdateBoundsRect

VisibleChanged

VisibleChanging

WantKey


TControl.ActionChange
 CLX 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.AdjustPainter
 CLX Reference

TControl.AdjustPainter

TControl	See also

Adjust area painted by QPainter object.

procedure AdjustPainter(Painter: QPainterH); virtual;

Description

AdjustPainter sets the device viewport and clipping rectangle for the specified Qt QPainter object. This restricts QPainter actions to the client area of the control. AdjustPainter is automatically called in TControlCanvas.BeginPainting.


TControl.AdjustSize
 CLX 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.AfterConstruction
 CLX Reference

TControl.AfterConstruction

TControl	See also

Responds after the last constructor has executed.

procedure AfterConstruction; override;

Description

TControl overrides AfterConstruction to remove csCreating from the ControlState property.

Do not call AfterConstruction in application code.


TControl.BeginAutoDrag
 CLX 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
 CLX 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 operation.


TControl.BoundsChanged
 CLX Reference

TControl.BoundsChanged

TControl	See also

Respond to changes in the control's size.

procedure BoundsChanged; dynamic;

Description

BoundsChanged is called automatically whenever the bounds of the control is changed. As implemented in TControl, BoundsChanged does nothing. Override BoundsChanged to make any final adjustments after a control is resized.

Unlike the Resize method, BoundsChanged is called while the control is being loaded.


TControl.BringToFront
 CLX Reference

TControl.BringToFront

TControl	See also

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 Qt widgets (control classes descended from TWidgetControl) 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.ChangeBounds
 CLX Reference

TControl.ChangeBounds

TControl	See also

Implement bounds change.

procedure ChangeBounds(ALeft, ATop, AWidth, AHeight: Integer); virtual;

Description

ChangeBounds is called automatically whenever an event, such as a property value change, might affect the size or position of the control. It is the job of ChangeBounds to verify that changes are needed and to implement them.

As implemented in TControl, ChangeBounds compares the Left, Top, Width, and Height properties with its corresponding parameters. If any do not match, ChangeBounds takes the following steps:

Invalidate the control's old rectangle on the parent control's client area.

Update the bounds property values.

Invalidate the control itself.

Update the control's anchor rules.

Call BoundsChanged and RequestAlign.

Call Resize, unless the control is in the process of being loaded from a stream.

Descendent classes can extend or modify this behavior. Note that TWidgetControl completely re-implements ChangeBounds.


TControl.ChangeScale
 CLX 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
 CLX 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
 CLX Reference

TControl.ClientToParent

TControl	See also

Translates client coordinates to parent coordinates.

function ClientToParent(const Point: TPoint; AParent: TWidgetControl = 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
 CLX 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.ColorChanged
 CLX Reference

TControl.ColorChanged

TControl

Notify control of color change.

procedure ColorChanged; dynamic;

Description

ColorChanged is called automatically when the Color property is changed. As implemented in TControl, ColorChanged simply calls Invalidate.


TControl.ConstrainedResize
 CLX 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.ControlsAligned
 CLX Reference

TControl.ControlsAligned

TControl

Notify control that child alignment complete.

procedure ControlsAligned; dynamic;

Description

ControlsAligned is called automatically when an child alignment operation, such as TWidgetControl.AlignControls, is complete.

As defined in TControl, ControlsAligned does nothing. Subclasses can override this method to add appropriate behavior, such as resizing the control so that all children are visible.


TControl.Create
 CLX Reference

TControl.Create

TControl	See also

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, ParentColor, ParentFont, and ParentShowHint to true.

Set Font to a newly-created TFont object. The OnChange handler for that object is an internal procedure.

Set Constraints to a newly-created TSizeConstraints object. The OnChange handler for that object is DoConstraintsChange.

Set ControlStyle to [csClickEvents, csSetCaption, csDoubleClicks].

Set Anchors to [akLeft, akTop].

Set Color to clWindow

Add csCreating to ControlState.

Set SizedFlags to [].

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.CursorChanged
 CLX Reference

TControl.CursorChanged

TControl	See also

Respond to cursor change.

procedure CursorChanged; dynamic;

Description

CursorChanged is called automatically when the Cursor property changes. As implemented in TControl, CursorChanged does nothing. Subclasses override CursorChanged in order to respond to changes in the Cursor property.


TControl.DblClick
 CLX 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 system event.


TControl.Destroy
 CLX 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.DoContextPopup
 CLX 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.DoEndDrag
 CLX 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
 CLX 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  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.


TControl.DoMouseWheelDown
 CLX 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
 CLX 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.DoStartDrag
 CLX 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
 CLX 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
 CLX Reference

TControl.DragDrop

TControl

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
 CLX Reference

TControl.Dragging

TControl

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
 CLX 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.EnabledChanged
 CLX Reference

TControl.EnabledChanged

TControl	See also

Respond to change in Enabled property.

procedure EnabledChanged; dynamic;

Description

EnabledChanged is called automatically when the Enabled property changes.

As implemented in TControl, EnabledChanged simply calls TControl.Invalidate. Descendent classes should override this method to implement additional behavior.


TControl.EndDrag
 CLX 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.FontChanged
 CLX Reference

TControl.FontChanged

TControl	See also

Respond to change in Font property.

procedure FontChanged; dynamic;

Description

FontChanged is called automatically when the Font property changes.

As implemented in TControl, FontChanged simply calls TControl.Invalidate. Subclasses should override this method to implement additional behavior.


TControl.GetActionLinkClass
 CLX 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.GetAlignedPaintDevice
 CLX Reference

TControl.GetAlignedPaintDevice

TControl	See also

Returns paint device for aligned control.

function GetAlignedPaintDevice: QPaintDeviceH; virtual;

Description

GetAlignedPaintDevice is called automatically when a Qt paint device is required for the control and the Align property is not alNone. As implemented in TControl, GetAlignedPaintDevice simply calls the same method in its parent control. Descendent control classes can change or extend the behavior of this protected method.


TControl.GetClientOrigin
 CLX 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
 CLX 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.GetDragImageHotspot
 CLX Reference

TControl.GetDragImageHotspot

TControl	See also

Return drag image hotspot.

function GetDragImageHotSpot: TPoint; virtual;

Description

GetDragImageHotspot is called automatically when dragging begins to determine the drag image hotspot. The hotspot is the location of the drag image relative to the mouse pointer, and is specified as the cursor’s location in the image’s coordinate space.

As defined in TControl, GetDragImageHotspot returns Point(-1, -1), which places the drag image one pixel down and right from the cursor. Descendent classes can override GetDragImageHotspot to specify a different hotspot.


TControl.GetDragImageIndex
 CLX Reference

TControl.GetDragImageIndex

TControl	See also

Return drag image index.

function GetDragImageIndex: TDragImageList; virtual;

Description

GetDragImageIndex is is called automatically to which the drag image for the control. The value returned by GetDragImageIndex is an index into an internal TImageList. A reference to this object is returned by DragImageList. If GetDragImageIndex returns –1, a default image is used.

As defined in TControl, GetDragImageIndex returns –1. Descendent classes can override GetDragImageIndex to specify a different drag image.


TControl.GetEnabled
 CLX 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.GetPaintDevice
 CLX Reference

TControl.GetPaintDevice

TControl	See also

Returns paint device for non-aligned control.

function GetAlignedPaintDevice: QPaintDeviceH; virtual;

Description

GetPaintDevice is called automatically when a Qt paint device is required for the control and the Align property is alNone. As implemented in TControl, GetPaintDevice simply calls the same method in its parent control. Descendent control classes can change or extend the behavior of this protected method.


TControl.GetParentComponent
 CLX 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 CLX 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
 CLX 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.GetText
 CLX Reference

TControl.GetText

TControl	See also

Returns the value of the Caption property.

function GetText: string; virtual;

Description

GetText is the protected access method for the Caption property. It is exposed as a protected method so descendants can override it to change the implementation of the Caption property.


TControl.HasParent
 CLX 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
 CLX 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.HintShow
 CLX Reference

TControl.HintShow

TControl

Show a hint.

function HintShow(var HintInfo : THintInfo): Boolean; dynamic;

Description

HintShow shows the hint string in HintInfo. An OnHint event is generated for the associated action link.


TControl.HintShowPause
 CLX Reference

TControl.HintShowPause

TControl

Notify control its hint is being shown.

procedure HintShowPause(var WasActive: Boolean; var Pause: Integer); dynamic;

Description

HintShowPause is a protected procedure that is called automatically when a mouse event causes the hint to be shown. WasActive is true if the hint was already being shown before the event occurred. Interval is the show period in milliseconds.

As implemented in TControl, HintShowPause does nothing. Subclasses an override the method to add additional hint handling.


TControl.HitTest
 CLX Reference

TControl.HitTest

TControl

Determines whether a point is in the client area.

function HitTest(X, Y: Integer): Boolean; dynamic;

Description

HitTest is used internally to determine whether a given point falls within the control’s client area. X and Y are the point’s coordinates in the control’s coordinate space.

As implemented in TControl, HitTest returns true if the X is a non-negative value less than Width and Y is a non-negative value less than Height. Subclasses can override this method to define a client area that is something other than a static rectangle.


TControl.InitiateAction
 CLX 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
 CLX 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.Loaded
 CLX 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.MouseDown
 CLX 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 pressing the left, right, or middle mouse button down. The horizontal and vertical coordinates on the desktop where the mouse was clicked are passed in the X and Y method parameters. The shift-key state is it passes Shift parameter. The value of the Button parameter indicates which mouse button was pressed down: left, right, or middle.


TControl.MouseEnter
 CLX Reference

TControlMouseEnter

TControl	See also

Respond to mouse moving into control area.

procedure MouseEnter(AControl: TControl); dynamic;

Description

MouseEnter is called automatically when the mouse cursor moves into the control's area.

As implemented in TControl, MouseEnter calls MouseEnter for its parent control, if it has a parent control. Descendent classes can modify or extend this behavior.


TControlMouseLeave
 CLX Reference

TControl.MouseLeave

TControl	See also

Respond to mouse moving out of control area.

procedure MouseLeave(AControl: TControl); dynamic;

Description

MouseLeave is called automatically when the mouse cursor moves out of the control's area.

As implemented in TControl, MouseLeave calls MouseLeave for its parent control, if it has a parent control. Descendent classes can modify or extend this behavior.


TControl.MouseMove
 CLX 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 when the mouse cursor moves over the control. The horizontal and vertical coordinates of the hotspot of the mouse cursor are passed in the X and Y method parameters. The shift-key state is it passes Shift parameter.

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
 CLX 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 the user releasing a mouse button that was previously pressed down. The horizontal and vertical coordinates on the desktop where the mouse button was released are passed in the X and Y method parameters. The shift-key state is passed in the Shift parameter. The value of the Button parameter indicates which mouse button was released: left, right, or middle.


TControl.Notification
 CLX 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.

By default, components pass along the notification to their owned components, if any.


TControl.PaintRequest
 CLX Reference

TControl.::PaintRequest

TControl	See also

Respond to paint requests.

procedure PaintRequest; dynamic;

Description

PaintRequest is called automatically when the control needs to repaint its own surface. As implemented in TControl, PaintRequest does nothing.

Most control classes rely on an underlying Qt widget to handle paint requests, and do not need to override PaintRequest. TGraphicControl is an important exception.


TControl.ParentColorChanged
 CLX Reference

TControl.ParentColorChanged

TControl	See also

Notify a child of parent color change.

procedure ParentColorChanged; dynamic;

Description

ParentColorChanged is called automatically to notify a child control that the Color property of its parent has changed. This allows the child control to match its own color, if necessary. As implemented in TControl, ParentColorChanged matches colors only if the ParentColor property is true.


TControl.ParentFontChanged
 CLX Reference

TControl.ParentFontChanged

TControl	See also

Notify a child of parent font change.

procedure ParentFontChanged; dynamic;

Description

ParentFontChanged is called automatically to notify a child control that the Font property of its parent has changed. This allows the child control to match its own font, if necessary. As implemented in TControl, ParentFontChanged matches fonts only if the ParentFont property is true.


TControl.ParentShowHintChanged
 CLX Reference

TControl.ParentShowHintChanged

TControl

Respond to change in ParentShowHint.

procedure ParentFontChanged; dynamic;

Description

ParentShowHintChanged is called automatically when the ParentShowHint property changes. As implemented in TControl, ParentShowHintChanged sets the ShowHint property value to match that of the parent control, provided ParentShowHint has changed to true.


TControl.ParentToClient
 CLX 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.ReadState
 CLX 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
 CLX 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
 CLX 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.RequestAlign
 CLX 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
 CLX 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
 CLX 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.SendToBack
 CLX 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.SetBounds
 CLX 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
 CLX 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.SetEnabled
 CLX 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
 CLX 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
 CLX Reference

TControl.SetParent

TControl	See also

Sets the parent of the control.

procedure SetParent(AParent: TWidgetControl); 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.SetParentComponent
 CLX 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.SetZOrder
 CLX 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
 CLX 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.ShowHintChanged
 CLX Reference

TControl.ShowHintChanged

TControl	See also

Notify control that ShowHint has changed.

procedure ShowHintChanged; dynamic;

Description

ShowHintChanged is called automatically when the ShowHint property is changed.

As implemented in TControl, ShowHintChanged does nothing. Subclasses can redefine ShowHintChanged to add responses to this event.


TControl.TextChanged
 CLX Reference

TControl.TextChanged

TControl

Notify control that text or caption has changed.

procedure TextChanged; dynamic;

Description

TextChanged is called automatically when the the Text or Caption property changes.

As defined in TControl, TextChanged does nothing. Subclasses can redefine this method to add response to this event.


TControl.Update
 CLX 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 system to repaint the control.

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
 CLX 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 Qt widget. UpdateBoundsRect updates the properties to match those passed in the rectangle as the R parameter.


TControl.VisibleChanged
 CLX Reference

TControl.VisibleChanged

TControl	See also

Respond to changes in Visible..

procedure VisibleChanged; dynamic;

Description

VisibleChanged iscalled automatically when the Visible property changes.

As implemented in TControl, VisibleChanged invalidates the parent control area allocated to this control. This  has the effect of redrawing the control the next time the parent is updated.


TControl.VisibleChanging
 CLX 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.WantKey
 CLX Reference

TControl.WantKey

TControl	See also

Handle non-focus keystrokes.

function WantKey(Key: Integer; Shift: TShiftState; KeyText: string): Boolean; dynamic;

Description

WantKey is called automatically for keystrokes that were not handled by NeedKey or by menu accelerator handlers. WantKey returns true if the control desires, but does not need, to provide final handling logic for the keyboard event.

When no NeedKey or menu handler can be found, the parent form’s WantKey method is called. This begins a recursive search that ends when a non-container control exits WantKey with a return value of true. Any control can claim responsibility for a key event, including controls that do not (or cannot) have the focus. A control can use WantKey to redirect the focus. For example, a “default” button control might implement WantKey in order to seize the focus when the Enter key is pressed.

WantKey takes the following parameters:

Key is the key code for the key pressed..

Shift indicates whether the Shift, Alt, and/or Control keys were used as modifier keys.

KeyText is the character value of the user input.

As implemented in TControl, WantKey returns false without attempting to handle the event. Subclasses can override this behavior, but should not return false without calling the inherited WantKey method.


Hierarchy

TObject

TPersistent

TComponent

TControl


TControlBar
 CLX Reference

 TControlBar

Hierarchy	Properties	Methods	Events	See also

TControlBar manages the layout of toolbar components.

Unit

QExtCtrls

Description

Use TControlBar as a container for toolbar components. Control bars contain child controls (usually TToolBar objects) that can be moved and resized independently. Each child control resides on its own individual band that the user positions by dragging its sizing grip.


 CLX Reference

TControlBar properties

TControlBar	Alphabetically	Legend

Derived from TCustomControlBar

AutoSize

ClientRect

BevelEdges

BevelInner

BevelOuter

GrabCursor

Picture

RowSize

RowSnap

Derived from TCustomControl

Canvas

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ControlCount

Controls

Enabled

Handle

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TControlBar properties

TControlBar	By object	Legend

Action

Align

Anchors

AutoSize

BevelEdges

BevelInner

BevelOuter

BoundsRect

Brush

Canvas

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

GrabCursor

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

Picture

PopupMenu

RowSize

RowSnap

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width


 CLX Reference

TControlBar events

TControlBar	Alphabetically	Legend

Derived from TCustomControlBar

OnBandDrag

OnBandInfo

OnBandMove

OnBandPaint

OnPaint

Derived from TWidgetControl

OnEnter

OnExit

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDrag


 CLX Reference

TControlBar events

TControlBar	By object	Legend

OnBandDrag

OnBandInfo

OnBandMove

OnBandPaint

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnMouseDown

OnMouseMove

OnMouseUp

OnPaint

OnResize

OnStartDrag


 CLX Reference

TControlBar methods

TControlBar	Alphabetically	Legend

Derived from TCustomControlBar

Create

Destroy

StickControls

Derived from TCustomControl

Invalidate

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX 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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

StickControls

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomControl

TCustomControlBar

TControlBar


TCustomActionList
 CLX Reference

TCustomActionList

Hierarchy	Properties	Methods	Events	See also

TCustomActionList is the base class for action list objects that manage a set of actions.

Unit

QActnList

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.

Action lists maintain a list of actions that can be grouped by category. Actions in an action list are TContainedAction or descendant types.


 CLX Reference

TCustomActionList properties

TCustomActionList	Alphabetically	Legend

In TCustomActionList

ActionCount

Actions

Images

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCustomActionList properties

TCustomActionList	By object	Legend

ActionCount

Actions

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Images

Name

Owner

Tag


TCustomActionList.Actions
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TCustomActionList events

TCustomActionList	Alphabetically	Legend

In TCustomActionList

OnChange

OnExecute

OnUpdate


 CLX Reference

TCustomActionList events

TCustomActionList	By object	Legend

OnChange

OnExecute

OnUpdate


TCustomActionList.OnChange
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TCustomActionList methods

TCustomActionList	Alphabetically	Legend

In TCustomActionList

AddAction

Change

Create

Destroy

ExecuteAction

GetChildren

IsShortCut

Notification

RemoveAction

SetChildOrder

UpdateAction

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

GetChildren

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

IsShortCut

MethodAddress

MethodName

NewInstance

Notification

ReferenceInterface

RemoveAction

RemoveComponent

RemoveFreeNotification

SafeCallException

SetChildOrder

SetSubComponent

UpdateAction


TCustomActionList.AddAction
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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(Key: Integer; Shift: TShiftState; KeyText: WideString): 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 property 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.

Key is the key code for the potential shortcut key.

Shift specifies the state of the Shift, Alt, and Ctrl keys that may be combined with Key.

KeyText is the string representation of the potential shortcut key.


TCustomActionList.Notification
 CLX 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
 CLX 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
 CLX 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.UpdateAction
 CLX 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


TCustomDialog
 CLX Reference

TCustomDialog

Hierarchy	Properties	Methods	Events	See also

TCustomDialog is the ancestor of non-Qt dialog boxes.

Unit

QDialogs

Description

TCustomDialog is an abstract class that represents some dialog boxes that do not use the Qt shared library dialog widgets. The TCustomDialog descendents handle such tasks as searching and replacing text in a file.

The dialogs do not appear at runtime until activated by a call to the Execute method. Except for TFindDialog and TReplaceDialog, all CLX dialogs are modal.


 CLX Reference

TCustomDialog properties

TCustomDialog	Alphabetically	Legend

Derived from TDialog

Height

HelpContext

HelpKeyword

HelpType

Modal

Position

Title

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCustomDialog properties

TCustomDialog	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Height

HelpContext

HelpKeyword

HelpType

Modal

Name

Owner

Position

Tag

Title

Width


 CLX Reference

TCustomDialog events

TCustomDialog	Alphabetically	Legend

Derived from TDialog

OnClose

OnShow


 CLX Reference

TCustomDialog events

TCustomDialog	By object	Legend

OnClose

OnShow


 CLX Reference

TCustomDialog methods

TCustomDialog	Alphabetically	Legend

In TCustomDialog

Execute

InvokeHelp

Derived from TComponent

BeforeDestruction

Create

Destroy

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


 CLX Reference

TCustomDialog methods

TCustomDialog	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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomDialog.Create
 CLX Reference

TCustomDialog.Create

TCustomDialog	See also

Creates and initializes a TCustomDialog 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.


TCustomDialog.Destroy
 CLX Reference

TCustomDialog.Destroy

TCustomDialog	See also

Destroys the TCustomDialog 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.


TCustomDialog.Execute
 CLX Reference

TCustomDialog.Execute

TCustomDialog	See also

Displays the dialog box.

function Execute: Boolean; virtual;

Description

The Execute method in TCustomDialog serves the same purpose and is used in the same manner as the Execute method found in TDialog. See the documentation for the inherited method for mor details.


TCustomDialog.InvokeHelp
 CLX Reference

TCustomDialog.InvokeHelp

TCustomDialog	See also

Starts the application's help system.

procedure InvokeHelp;

Description

Use Invoke to display help information for the dialog. The information passed to the help system will either be a keyword or a context ID, depending on the value of HelpType.


Hierarchy

TObject

TPersistent

TComponent

TDialog

TCustomDialog


TCustomVariantType
 CLX Reference

TCustomVariantType

Hierarchy	Properties	Methods	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 FMTBcd unit, which implements a custom Variant type for binary-coded decimal 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.


 CLX Reference

TCustomVariantType properties

TCustomVariantType	Alphabetically	Legend

In TCustomVariantType

VarType


 CLX Reference

TCustomVariantType properties

TCustomVariantType	By object	Legend

VarType


TCustomVariantType.VarType
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TControlActionLink

Hierarchy	Properties	Methods	Events	See also

TControlActionLink links action objects to clients that descend from TControl.

Unit

QControls

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 CLX, such as TWidgetControlActionLink, which supports TWidgetControl client types.


 CLX Reference

TControlActionLink properties

TControlActionLink	Alphabetically	Legend

Derived from TBasicActionLink

Action


 CLX Reference

TControlActionLink properties

TControlActionLink	By object	Legend

Action


 CLX Reference

TControlActionLink events

TControlActionLink	Alphabetically	Legend

Derived from TBasicActionLink

OnChange


 CLX Reference

TControlActionLink events

TControlActionLink	By object	Legend

OnChange


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TControlScrollBar

Hierarchy	Properties	Methods	See also

TControlScrollBar displays a horizontal or vertical scroll bar.

Unit

QForms

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.


 CLX Reference

TControlScrollBar properties

TControlScrollBar	Alphabetically	Legend

In TControlScrollBar

Color

Handle

Increment

Kind

Margin

ParentColor

Position

Range

ScrollPos

Tracking

Visible


 CLX Reference

TControlScrollBar properties

TControlScrollBar	By object	Legend

Color

Handle

Increment

Kind

Margin

ParentColor

Position

Range

ScrollPos

Tracking

Visible


TControlScrollBar.Color
 CLX 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 is the same as the Color property of the control on which the scrollbar appears.


TControlScrollBar.Handle
 CLX Reference

TControlScrollBar.Handle

TControlScrollBar

Provides access to the handle of the underlying widget scroll bar.

property Handle: QScrollBarH;

Description

Handle is a 4-byte identifier that uniquely represents the underlying Widget instance. Use this handle when making low-level function calls into the Qt shared libraries, where the function call requires an instance pointer.


TControlScrollBar.Increment
 CLX 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.


TControlScrollBar.Kind
 CLX 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
 CLX 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
 CLX Reference

TControlScrollBar.ParentColor

TControlScrollBar	See also

Specifies whether the scroll bar should get its color from the control that uses it.

property ParentColor: Boolean;

Description

Use ParentColor to indicate that the scroll bar should get its color from the Color property of the control that uses it. When the value of the Color property is changed, its ParentColor property is automatically set to False.


TControlScrollBar.Position
 CLX 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
 CLX 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
 CLX 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.Tracking
 CLX 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
 CLX 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.


 CLX Reference

TControlScrollBar methods

TControlScrollBar	Alphabetically	Legend

In TControlScrollBar

Assign

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


 CLX Reference

TControlScrollBar methods

TControlScrollBar	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

IsScrollBarVisible

MethodAddress

MethodName

NewInstance

SafeCallException


TControlScrollBar.Assign
 CLX 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.IsScrollBarVisible
 CLX 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
 CLX Reference

TControlScrollBar.Create

TControlScrollBar	See also

Creates a new TControlScrollBar object.

constructor Create(AControl: TScrollingWidget; 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


TControlCanvas
 CLX Reference

TControlCanvas

Hierarchy	Properties	Methods	Events	See also

TControlCanvas is a specialized canvas object associated with a control.

Unit

QControls

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 Qt widgets 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 Qt painter associated with the control.


 CLX Reference

TControlCanvas Properties

TControlCanvas	Alphabetically	Legend

In TControlCanvas

Clipped

Control

Derived from TCanvas

Brush

ClipRect

CopyMode

Font

Handle

LockCount

Pen

PenPos

StartCount

TextAlign


 CLX Reference

TControlCanvas Properties

TControlCanvas	By Object	Legend

Brush

Clipped

ClipRect

Control

CopyMode

Font

Handle

LockCount

Pen

PenPos

StartCount

TextAlign


TControlCanvas.Clipped
 CLX Reference

TControlCanvas.Clipped

TControlCanvas	See also

Indicates whether part of the canvas is obscured by another control.

property Clipped: Boolean;

Description

When Clipped is True, the canvas is known to be partially obscured by another control. When Clipped is False, it is unknown whether the canvas is clipped.


TControlCanvas.Control
 CLX 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 TWidgetControl 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.


 CLX Reference

TControlCanvas events

TControlCanvas	Alphabetically	Legend

Derived from TCanvas

OnChange

OnChanging


 CLX Reference

TControlCanvas events

TControlCanvas	By object	Legend

OnChange

OnChanging


 CLX Reference

TControlCanvas Methods

TControlCanvas	Alphabetically	Legend

In TControlCanvas

Destroy

FreeHandle

StartPaint

StopPaint

Derived from TCanvas

Arc

Chord

CopyRect

Create

Draw

DrawFocusRect

DrawPoint

DrawPoints

Ellipse

FillRect

GetClipRegion

LineTo

Lock

MoveTo

Pie

PolyBezier

PolyBezierTo

Polygon

Polyline

Rectangle

Refresh

ReleaseHandle

ResetClipRegion

RoundRect

SetClipRect

Start

Stop

StretchDraw

TextExtent

TextHeight

TextOut

TextRect

TextWidth

TiledDraw

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


 CLX Reference

TControlCanvas Methods

TControlCanvas	By Object	Legend

AfterConstruction

Arc

Assign

BeforeDestruction

Chord

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyRect

Create

DefaultHandler

Destroy

Dispatch

Draw

DrawFocusRect

DrawPoint

DrawPoints

Ellipse

FieldAddress

FillRect

Free

FreeHandle

FreeInstance

GetClipRegion

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LineTo

Lock

MethodAddress

MethodName

MoveTo

NewInstance

Pie

PolyBezier

PolyBezierTo

Polygon

Polyline

Rectangle

Refresh

ReleaseHandle

ResetClipRegion

RoundRect

SafeCallException

SetClipRect

Start

StartPaint

Stop

StopPaint

StretchDraw

TextExtent

TextHeight

TextOut

TextRect

TextWidth

TiledDraw

TryLock

Unlock


TControlCanvas.Destroy
 CLX 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
 CLX Reference

TControlCanvas.FreeHandle

TControlCanvas	See also

Releases the handle to the painter used by the control canvas object.

procedure FreeHandle;

Description

Call FreeHandle to free the painter used by the control canvas. FreeHandle sets the Handle property to NULL. After calling FreeHandle, an painter will be reacquired if any of the drawing methods are called.


TControlCanvas.StartPaint
 CLX Reference

TControlCanvas.StartPaint

TControlCanvas	See also

Initializes the canvas for a drawing operation.

procedure StartPaint;

Description

TControlCanvas uses StartPaint as a simplified way to initialize the canvas for a drawing operation. StartPaint simply calls the StartMethod with the FreshState parameter set to True (that is, instructing the canvas to reset the pen, font, and brush before continuing with the paint operation).

Every operation that paints on the canvas must begin with a call to the Start or StartPaint method and end with a call to the Stop or StopPaint method. TControlCanvas automatically makes these calls when you draw to the canvas using the TControlCanvas methods.

Each call to StartPaint must be matched by a corresponding call to Stop or StopPaint when the drawing operation is complete.


TControlCanvas.StopPaint
 CLX Reference

TControlCanvas.StopPaint

TControlCanvas	See also

Signals the end of a drawing operation.

procedure StopPaint;

Description

Call StopPaint to signal the end of any drawing operation that you preceded by a call to the Start or StartPaint method.

Each call to StopPaint decrements the StartCount property, which was incremented by the Start or StartPaint method. When StartCount drops to 0, StopPaint releases the resources it originally allocated for the drawing operation.


Hierarchy

TObject

TPersistent

TCanvas

TControlCanvas


TCustomIconView
 CLX Reference

TCustomIconView

Hierarchy	Properties	Methods	See also

TCustomIconView is the base class for controls that display simple icon items.

Unit

QComCtrls

Description

TCustomIconView is a base class for views that represent information items as an array of icons. Do not create instances of TCustomIconView. Use the generic descendent, TIconView, or derive your own icon view class.


 CLX Reference

TCustomIconView Properties

TCustomIconView	Alphabetically	Legend

In TCustomIconView

Handle

IconOptions

Images

Items

ItemsMovable

MultiSelect

ResizeMode

SelCount

Selected

ShowToolTips

Sort

SortDirection

Spacing

TextPosition

Derived from TWidgetControl

Brush

ChildHandle

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomIconView Properties

TCustomIconView	By Object	Legend

Action

Align

Anchors

BoundsRect

Brush

ChildHandle

ClientHeight

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

IconOptions

Images

Items

ItemsMovable

Left

MultiSelect

Name

Owner

Parent

ParentWidget

ResizeMode

SelCount

Selected

ShowHint

Showing

ShowToolTips

Sort

SortDirection

Spacing

TabOrder

TabStop

Tag

TextPosition

Top

Visible

Width


TCustomIconView.Handle
 CLX Reference

TCustomIconView.Handle

TCustomIconView	See also

Returns a pointer to the underlying Qt widget.

property Handle: QIconViewH;

Description

Handle returns a pointer to the QIconView widget object that TCustomIconView wraps.


TCustomIconView.IconOptions
 CLX Reference

TCustomIconView.IconOptions

TCustomIconView

Controls how icons are displayed.

property IconOptions: TIconOptions;

Description

IconOptions specifies various icon arrangement and display options.


TCustomIconView.Images
 CLX Reference

TCustomIconView.Images

TCustomIconView

Lists the icons that this control displays.

property Images: TCustomImageList;

Description

Images contains a list of images that can be used as icons. Each item's ImageIndex property determines the specific image displayed on it. If Images is unassigned, items are displayed as captions with no icons.


TCustomIconView.Items
 CLX Reference

TCustomIconView.Items

TCustomIconView	See also

Contains the list of items displayed by the icon view.

property Items: TListItems;

Description

Use Items to directly access the TIconViewItem objects that represent the items in the view. Setting this property at design time brings up the Items Editor. Use this dialog to add or delete items 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.


TCustomIconView.ItemsMovable
 CLX Reference

TCustomIconView.ItemsMovable

TCustomIconView

Controls whether users can move the icons within the view.

property ItemsMovable: Boolean;

Description

Set ItemsMovable to True to enable support for movable icons.


TCustomIconView.MultiSelect
 CLX Reference

TCustomIconView.MultiSelect

TCustomIconView	See also

Determines whether the user can select more than one element at a time.

property MultiSelect: Boolean;

Description

If MultiSelect is True the user can select multiple items and deselect any selected item. If MultiSelect if False, the user can only select one item at a time.and only deselect an item by selecting a different item.


TCustomIconView.ResizeMode
 CLX Reference

TCustomIconView.ResizeMode

TCustomIconView

Determines how the icon view responds when it is resized.

type TResizeMode = (rmFixed, rmAdjust);

property ResizeMode: TResizeMode;

Description

If a resize of the icon view would remove space currently used by one or more icons, ResizeMode determines the response. If ResizeMode is rmAdjust (default), the icon view attempts to make all icons visible by rearranging them. If ResizeMode is rmFixed, the affected icons simply scroll off the viewport.


TCustomIconView.SelCount
 CLX Reference

TCustomIconView.SelCount

TCustomIconView	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.


TCustomIconView.Selected
 CLX Reference

TCustomIconView.Selected

TCustomIconView	See also

Specifies the selected item.

property Selected: TTreeNode;

Description

Read Selected to access the selected item. If there is no selected item, the value of Selected is nil.

Set Selected to select an item. When a node becomes selected, the icon view's OnChanging and OnChange event occurs.

If MultiSelect is True, use the individual items' Selected properties to manage the selections.


TCustomIconView.ShowToolTips
 CLX Reference

TCustomIconView.ShowToolTips

TCustomIconView	See also

Enables or disables tooltips.

property ShowToolTips: Boolean;

Description

If ShowToolTips is True, the user can view obscured captions by poising the mouse pointer over the item.


TCustomIconView.Sort
 CLX Reference

TCustomIconView.Sort

TCustomIconView	See also

Constrols whether the icon view sorts its items.

property Sort: Boolean;

Description

If Sort is True, then items are automatically kept in case-sensitive alphabetical order, using their captions. Use SortDirection to set the sort direction.


TCustomIconView.SortDirection
 CLX Reference

TCustomIconView.SortDirection

TCustomIconView

Indicates the sort order when the icon view sorts its items.

property SortDirection: TSortDirection;

Description

Set SortDirection to to sdAscending to for an ascending sort of view items, sdDescending for a descending sort of view items. The Sort property must be True.


TCustomIconView.Spacing
 CLX Reference

TCustomIconView.Spacing

TCustomIconView

Specifies the spacing between icons.

property Spacing: Integerdefault 5;

Description

Spacing determines the number of pixels between items.


TCustomIconView.TextPosition
 CLX Reference

TCustomIconView.TextPosition

TCustomIconView

Specifies the position of text relative to its corresponding icon.

type TItemTextPos = (itpBottom, itpRight);

property TextPosition: TItemTextPos default itpBottom;

Description

TextPosition indicates where the text appears relative to the icon. The following table lists the possible values:

Value	Meaning

itpBottom	The text label appears below the icon.

itpRight	The text label appears to the right of the icon.


 CLX Reference

TCustomIconView Events

TCustomIconView	Alphabetically	Legend

In TCustomIconView

OnChange

OnChanging

OnEdited

OnItemClicked

OnItemDoubleClick

OnItemEnter

OnItemExitViewportEnter

OnSelectItem


 CLX Reference

TCustomIconView Events

TCustomIconView	By Object	Legend

OnChange

OnChanging

OnEdited

OnItemClicked

OnItemDoubleClick

OnItemEnter

OnItemExitViewportEnter

OnSelectItem


TCustomIconView.OnChange
 CLX Reference

TCustomIconViewOnChange

TCustomIconView	See also

Occurs immediately after an item in the list changes.

TIVChangeEvent = procedure (Sender: TObject; Item: TIconViewItem; Change: TItemChange) ofobject;

property OnChange: TIVChangeEvent;

Description

Write an OnChange event handler to respond to successful changes in the view items. The Item parameter is the list item that just changed. The Change parameter indicates the type of change.


TCustomIconView.OnChanging
 CLX Reference

TCustomIconView.OnChanging

TCustomIconView	See also

Occurs when an item in the view is about to change.

type TIVChangingEvent = procedure (Sender: TObject; Item: TIconViewItem; Change: TItemChange; var AllowChange: Boolean) ofobject;

property OnChanging: TIVChangingEvent;

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.


TCustomIconView.OnEdited
 CLX Reference

TCustomIconView.OnEdited

TCustomIconView	See also

Occurs immediately after the user edits an item’s Caption property.

type TIVEditedEvent = procedure(Sender: TObject; Item: TIconViewItem; const NewName: WideString) ofobject;

property OnEdited: TIVEditedEvent;

Description

Write an OnEdited event to take specific action when a user has finished editing the text of a list item.

The Item parameter is the list item that was just edited. The NewName parameter is the new value the user typed for the item’s Caption property. When OnEdited occurs, the item’s Caption property has not yet been changed, so NewName can still be compared to the original value of Caption.


TCustomIconView.OnItemClicked
 CLX Reference

TCustomIconView.OnItemClicked

TCustomIconView 	See Also

Occurs when an item is clicked.

Type TIVItemClickEvent = procedure(Sender: TObject; Item: TIconViewItem) ofobject;

property OnItemClicked: TIVItemClickEvent;

Description

Use OnItemClicked to respond to mouse clicks. The OnClick event can also be triggered by keyboard or menu events that are equivalent to mouse clicks. See TControl.OnClick.


TCustomIconView.OnItemDoubleClick
 CLX Reference

TCustomIconView.OnItemDoubleClick

TCustomIconView

Occurs when an item is double-clicked.

Type TIVItemEvent = procedure(Sender: TObject; Item: TIconViewItem) ofobject;

     TIVItemDoubleClickEvent = TIVItemEvent;

property OnItemDoubleClick: TIVItemDoubleClickEvent;

Description

Use OnItemDoubleClick to respond to double clicks on an item.

The Item parameter identifies the item that was double-clicked.


TCustomIconView.OnItemEnter
 CLX Reference

TCustomIconView.OnItemEnter

TCustomIconView

Occurs when an the mouse pointer enters the item's space.

Type TIVItemEvent = procedure(Sender: TObject; Item: TIconViewItem) ofobject;

     TIVItemEnterEvent = TIVItemEvent;

property OnItemEnter: TIVItemEnterEvent;

Description

Use OnItemEnter to respond to mouse motion over items. This event occurs when the mouse enters the rectangle used by Item.


TCustomIconView.OnItemExitViewportEnter
 CLX Reference

TCustomIconView.OnItemExitViewportEnter

TCustomIconView

Occurs when the mouse pointer moves from an item to empty viewport area.

TIVItemExitViewportEnterEvent = TNotifyEvent;

property OnItemExitViewportEnter: TIVItemExitViewportEnterEvent;

Description

Use OnItemExitViewportEnter to respond when the user moves the mouse pointer from an item to empy viewport space not occupied by any item.


TCustomIconView.OnSelectItem
 CLX Reference

TCustomIconView.OnSelectItem

TCustomIconView	See also

Occurs when an item is selected or deselected.

Type TIVSelectItemEvent = procedure(Sender: TObject; Item: TIconViewItem; Selected: Boolean) ofobject;

property OnSelectItem: TIVSelectItemEvent;

Description

Use OnSelectItem to perform actions when an item is selected (Selected is True) or deselected (Selected is False).


 CLX Reference

TCustomIconView Methods

TCustomIconView	Alphabetically	Legend

In TCustomIconView

BeginAutoDrag

Clear

ColorChanged

Create

CreateWidget

Destroy

DoChange

DoChanging

EnsureItemVisible

FindItemByPoint

FindItemByText

FindVisibleItem

GetNextItem

ImageListChanged

InitWidget

Notification

RepaintItem

SelectAll

UpdateControl

UpdateItems

ViewportHandle

WidgetDestroyed

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomIconView Methods

TCustomIconView	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginAutoDrag

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClientToParent

ClientToScreen

ColorChanged

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

CreateWidget

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DoChange

DoChanging

DragDrop

Dragging

EnableAlign

EndDrag

EnsureItemVisible

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindItemByPoint

FindItemByText

FindVisibleItem

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetNextItem

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

ImageListChanged

InheritsFrom

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

Notification

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

RepaintItem

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControl

UpdateControlState

UpdateItems

ViewportHandle

WidgetDestroyed


TCustomIconView.BeginAutoDrag
 CLX Reference

TCustomIconView.BeginAutoDrag

TCustomIconView	See also

Begins an automatically-initiated drag operation.

procedure BeginAutoDrag; override;

Description

TCustomIconView overrides BeginAutoDrag in order to disable immediate dragging. This means that a dragging event will not occur until the control has moved past the threshold specified by Threshold property of the global Mouse variable.


TCustomIconView.Clear
 CLX Reference

TCustomIconView.Clear

TCustomIconView

Deletes all items from the view.

procedure Clear;

Description

Call Clear to remove all icons from the icon view.


TCustomIconView.ColorChanged
 CLX Reference

TCustomIconView.ColorChanged

TCustomIconView	See also

Responds when the Color property changes.

procedure ColorChanged; override;

Description

TCustomIconView overrides ColorChanged in order to call UpdateControl.


TCustomIconView.Create
 CLX Reference

TCustomIconView.Create

TCustomIconView	See also

Creates an instance of TCustomIconView.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an icon view at runtime. Icon views added to forms at design time are created automatically.

AOwner is the component (typically the form) that becomes the value of the Owner property. The Owner is responsible for freeing the icon view instance.


TCustomIconView.CreateWidget
 CLX Reference

TCustomIconView.CreateWidget

TCustomIconView	See also

Creates the underlying widget.

procedure CreateWidget; override;

Description

TCustomIconView overrides Create in order to create and initialize the underlying QIconView widget.


TCustomIconView.Destroy
 CLX Reference

TCustomIconView.Destroy

TCustomIconView	See also

Destroys an instance of TCustomIconView.

destructor Destroy; override;

Description

TCustomIconView overrides Destroy in order to deallocate the objects allocated in Create


TCustomIconView.DoChange
 CLX Reference

TCustomIconView.DoChange

TCustomIconView 	See also

Responds to a successful item change.

procedure DoChange(Item: TIconViewItem; Change: TItemChange); dynamic;

Description

DoChange is called automatically after a successful item change. Item is the item change, Change describes the nature of the change.

As implemented in TCustomIconView, DoChange simply calls the OnChange event handler, if defined. Descendent classes can extend or modify this behavior.


TCustomIconView.DoChanging
 CLX Reference

TCustomIconView.DoChanging

TCustomIconView 	See also

Responds to a pending item change.

procedure DoChanging(Item: TIconViewItem; Change: TItemChange; var AllowChange: Boolean); dynamic;

Description

DoChanging is called automatically when Item is about to change. Change passes the nature of the change. DoChanging can abort the change by setting AllowChange to False.

As implemented in TCustomIconView, DoChanging simply calls the OnChanging event handler, if defined. Descendent classes can extend or modify this behavior.


TCustomIconView.EnsureItemVisible
 CLX Reference

TCustomIconView.EnsureItemVisible

TCustomIconView

Scrolls an item into view.

procedure EnsureItemVisible(AItem: TIconViewItem);

Description

If AItem is not currently visible, EnsureItemVisible scrolls the view until it is.


TCustomIconView.FindItemByPoint
 CLX Reference

TCustomIconView.FindItemByPoint

TCustomIconView

Returns the item at specified client coordinates.

function FindItemByPoint(const Pt: TPoint): TIconViewItem;

Description

FindItemByPoint returns the view item that contains Pt in the view's client area. FindItemByPoint returns nilif no such item exists.


TCustomIconView.FindItemByText
 CLX Reference

TCustomIconView.FindItemByText

TCustomIconView

Returns the item with specified caption.

function FindItemByText(const Str: WideString): TIconViewItem;

Description

FindItemByText returns the view item with caption Str. FindItemByText returns nilif no such item exists.


TCustomIconView.FindVisibleItem
 CLX Reference

TCustomIconView.FindVisibleItem

TCustomIconView

Returns the item in a specified rectangle.

function FindVisibleItem(First: Boolean; const ARect: TRect): TIconViewItem;

Description

FindVisibleItem returns the first (First is True) or last (First is False) item in the client area given by ARect. FindVisibleItem returns nilif no such item exists.


TCustomIconView.GetNextItem
 CLX Reference

TCustomIconView.GetNextItem

TCustomIconView

Returns the item adjacent to a specified item.

function GetNextItem(StartItem: TIconViewItem; Direction: TSearchDirection; States: TItemStates): TIconViewItem;

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.


TCustomIconView.ImageListChanged
 CLX Reference

TCustomIconView.ImageListChanged

TCustomIconView 	See also

Responds to changes in the image list.

procedure ImageListChanged; dynamic;

Description

ImageListChanged is called automatically when the control's image list has changed. As implemented in TCustomIconView, ImageListChanged updates the image for each item. Descendent classes can modify or extend this behavior.


TCustomIconView.InitWidget
 CLX Reference

TCustomIconView.InitWidget

TCustomIconView

Initializes the underlying Qt widget

procedure InitWidget; override;

Description

TCustomIconView overrides InitWidget in order to initalize the properties of the underlying QIconView object.


TCustomIconView.Notification
 CLX Reference

TCustomIconView.Notification

TCustomIconView	See also

Responds when components are created and destroyed.

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

Description

TCustomIconView overrides Notification in order to call ImageListChanged when the image list is removed.


TCustomIconView.RepaintItem
 CLX Reference

TCustomIconView.RepaintItem

TCustomIconView

Repaints an item.

procedure RepaintItem(AItem: TIconViewItem);

Description

RepaintItem repaints AItem.


TCustomIconView.SelectAll
 CLX Reference

TCustomIconView.SelectAll

TCustomIconView

Selects or deselects all items.

procedure SelectAll(Select: Boolean);

Description

If the MultiSelect property is True, SelectAll selects (Select is True) or deselects (Select is False) all items. If the MultiSelect property is False, only the item


TCustomIconView.UpdateControl
 CLX Reference

TCustomIconView.UpdateControl

TCustomIconView	See also

Forces a repaint of the icon view.

procedure UpdateControl;

Description

Call UpdateControl to force the icon view to repaint itself.


TCustomIconView.UpdateItems
 CLX Reference

TCustomIconView.UpdateItems

TCustomIconView	See also

Forces a repaint of specified items.

procedure UpdateItems(FirstIndex, LastIndex: Integer);

Description

Call UpdateItems to force the icon view to repaint a specified range of items.

FirstIndex is the index of the first item to repaint.

LastIndex is the index of the last item to repaint.


TCustomIconView.ViewportHandle
 CLX Reference

TCustomIconView.ViewportHandle

TCustomIconView	See also

Returns the handle to the underlying viewport object that represents the visible client area of the icon view.

function ViewportHandle: QWidgetH;

Description

ViewPortHandle returns the handle to the child widget that TCustomIconView uses to represent its client area. This is a pointer to the underlying viewport widget.


TCustomIconView.WidgetDestroyed
 CLX Reference

TCustomIconView.WidgetDestroyed

TCustomIconView	See also

Responds when the underlying widget that implements the icon view is freed.

procedure WidgetDestroyed; override;

Description

WidgetDestroyed performs all necessary cleanup to the icon view object when its underlying widget is feed. This includes clearing the Handle and ViewportHandle properties, as well as releasing any hooks for responding to event notifications from the underlying widget.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomIconView


TCustomSpinEdit
 CLX Reference

TCustomSpinEdit

Hierarchy	Properties	Methods	Events

TCustomSpinEdit is the base class for spin boxes that enable users to choose a number.

Unit

QComCtrls

Description

Use TCustomSpinEdit as a base class for defining spin box controls. Spin boxes allow the user to choose from a range of numeric values by clicking on special "spin buttons", or by pressing vertical arrow keys. Users can also enter the value in a text box, as with an edit control. Spin boxes support non-numeric prefixes and suffixes, such as currency symbols, and special values with non-numeric representations.

Do not create instance of TCustomSpinEdit. Use its generic descendent, TSpinEdit, or create your own descendent class.


 CLX Reference

TCustomSpinEdit Properties

TCustomSpinEdit	Alphabetically	Legend

In TCustomSpinEdit

ButtonStyle

CleanText

Handle

Increment

Max

Min

Prefix

RangeControl

SpecialText

Suffix

Text

Value

Wrap

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomSpinEdit Properties

TCustomSpinEdit	By Object	Legend

Action

Align

Anchors

BoundsRect

Brush

ButtonStyle

ChildHandle

CleanText

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Increment

Left

Max

Min

Name

Owner

Parent

ParentWidget

Prefix

RangeControl

ShowHint

Showing

SpecialText

Suffix

TabOrder

TabStop

Tag

Text

Top

Value

Visible

Width

Wrap


TCustomSpinEdit.ButtonStyle
 CLX Reference

TCustomSpinEdit.ButtonStyle

TCustomSpinEdit

Determines appearance of spin buttons

type TSEButtonStyle = (bsArrows, bsPlusMinus);

property ButtonStyle: TSEButtonStyle;

Description

Use ButtonStyle to determine the appearance of the control's spin buttons. If ButtonStyle is bsArrows (the default), the spin buttons display vertical arrows. If ButtonStyle is bsPlusMinus, the spin buttons display plus and minus signs.


TCustomSpinEdit.CleanText
 CLX Reference

TCustomSpinEdit.CleanText

TCustomSpinEdit 	See also

Indicates the value of the spin edit, without any prefix or suffix.

property CleanText: WideString;

Description

The CleanText property is read-only and represents the contents of the control with any Prefix, or Suffix removed.


TCustomSpinEdit.Handle
 CLX Reference

TCustomSpinEdit.Handle

TCustomSpinEdit 	See also

Provides access to the underlying widget.

property Handle: QClxSpinBoxH;

Description

Handle is a pointer to the underlying Qt widget.


TCustomSpinEdit.Increment
 CLX Reference

TCustomSpinEdit.Increment

TCustomSpinEdit

Specifies the amount by which the number increments or decrements when the user clicks the buttons on the spin edit control.

property Increment: Integer;

Description

Increment specifies the value that is added or subtracted from Value when the user spins the control.


TCustomSpinEdit.Max
 CLX Reference

TCustomSpinEdit.Max

TCustomSpinEdit

Specifies the maximum value the user can enter into the spin edit control.

property Max: Integer;

Description

Max specifies the maximum for the Value property. If the user enters a number greater than Max, the number is changed to Max. This also happens if the user attempts to spin past Max when Wrap is False. If Wrap is True and the user attempts to spin past Max, the number is changed to the value of the Min property.


TCustomSpinEdit.Min
 CLX Reference

TCustomSpinEdit.Min

TCustomSpinEdit

Specifies the minimum value the user can enter into the spin edit control.

property Min: Integer;

Description

The Min property specifies the minimum for the Value property. If the user enters a number less than Min, the number is changed to Min. This also happens if the user attempts to spin past Min when Wrap is False. If Wrap is True  and the user attempts to spin past Min, the number is changed to the value of the Max property.


TCustomSpinEdit.Prefix
 CLX Reference

TCustomSpinEdit.Prefix

TCustomSpinEdit	See also

Specifies the prefix that precedes the numeric value of the spin edit control.

property Prefix: WideString;

Description

Prefix specifies a special string, such as a currency symbol, that appears as a prefix in the spin box display and is included in the Text property. Both the CleanText property and the Value property omit the Prefix in their values.


TCustomSpinEdit.RangeControl
 CLX Reference

TCustomSpinEdit.RangeControl

TCustomSpinEdit	See also

Provides access to the widget that controls the buttons on the spin edit.

property RangeControl: QRangeControlH;

Description

The RangeControl property returns a pointer to the widget that implements the spin buttons on the spin edit control.


TCustomSpinEdit.SpecialText
 CLX Reference

TCustomSpinEdit.SpecialText

TCustomSpinEdit

Specifies a special or default value.

property SpecialText:WideString;

Description

SpecialText property is a string that the control displays when Value is equal to Min. This string is meant to represent a special or default value.

When the control displays SpecialText, the Prefix and Suffix properties are not used, and both Text and CleanText also return the special string.


TCustomSpinEdit.Suffix
 CLX Reference

TCustomSpinEdit.Suffix

TCustomSpinEdit	See also

Specifies the suffix that follows the numeric value of the spin edit control.

property Suffix: WideString;

Description

Suffix specifies a special string, such as a unit of measure, that appears as a suffix in the spin box display and is returned in the Text property. Both the CleanText property and the Value property omit the Suffix in their return values.


TCustomSpinEdit.Text
 CLX Reference

TCustomSpinEdit.Text

TCustomSpinEdit	See also

Indicates the value that appears in the spin box display.

property Text: TCaption;

Description

The read-only Text property represents the contents of the control exactly as it is seen by the user..


TCustomSpinEdit.Value
 CLX Reference

TCustomSpinEdit.Value

TCustomSpinEdit	See also

Indicates the numeric value of the spin edit control.

property Value: Integer;

Description

The Value property determines the current numeric value of the control. If Value is equal to the Min property and the SpecialText property is defined, the control displays the string in SpecialText. Otherwise, the control converts the Value property to its string representation, prepends the Prefix property (if defined) and appends the Suffix property (if defined).


TCustomSpinEdit.Wrap
 CLX Reference

TCustomSpinEdit.Wrap

TCustomSpinEdit	See also

Determines how the spin control’s value changes when the user attempts to spin past the minimum or maximum value.

property Wrap: Boolean;

Description

Use Wrap to specify how the spin edit control responds when the user tries to use the buttons to spin past the minimum or maximum value. When Wrap is True, the value “wraps” around, treating the maximum value as the next value before the minimum value, and treating the minimum value as the next value after the maximum value. When Wrap is False, the value stops changing at the maximum and minimum values.


 CLX Reference

TCustomSpinEdit Events

TCustomSpinEdit	Alphabetically	Legend

In TCustomSpinEdit

OnChanged


 CLX Reference

TCustomSpinEdit Events

TCustomSpinEdit	By Object	Legend

OnChanged


TCustomSpinEdit.OnChanged
 CLX Reference

TCustomSpinEditOnChanged

TCustomSpinEdit	See also

Occursafteranewtabisselected.

type TSEChangedEvent = procedure (Sender: TObject; NewValue: Integer) ofobject;

property OnChanged: TSEChangedEvent;

Description

Write an OnChanged event handler to take specific action immediately after the control contents change. NewValue is the new value of the Value property.


 CLX Reference

TCustomSpinEdit Methods

TCustomSpinEdit	Alphabetically	Legend

In TCustomSpinEdit

Change

Create

CreateWidget

EventFilter

GetText

HookEvents

InitWidget

Loaded

PaletteChanged

StepDown

StepUp

WidgetDestroyed

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomSpinEdit Methods

TCustomSpinEdit	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

CreateWidget

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

EventFilter

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetText

HandleAllocated

HandleNeeded

HasParent

Hide

HookEvents

InheritsFrom

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

Loaded

MethodAddress

MethodName

NewInstance

PaletteChanged

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

StepDown

StepUp

Update

UpdateAction

UpdateControlState

WidgetDestroyed


TCustomSpinEdit.Change
 CLX Reference

TCustomSpinEdit.Change

TCustomSpinEdit	See also

Generates an OnChange event.

procedure Change(AValue: Integer); dynamic;

Description

Change is called automatically when the value of the spin edit control changes. As implemented in TCustomSpinEdit, Change calls the OnChange event handler.


TCustomSpinEdit.Create
 CLX Reference

TCustomSpinEdit.Create

TCustomSpinEdit 	See also

Creates an instance of TCustomSpinEdit.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a spin edit control at runtime. Spin edit controls added to forms at design time are created automatically.

AOwner is a component, typically the form, that is responsible for freeing the control. It becomes the value of the Owner property.


TCustomSpinEdit.CreateWidget
 CLX Reference

TCustomSpinEdit.CreateWidget

TCustomSpinEdit	See also

Instantiates the underlying widget that implements the spin edit control.

procedure CreateWidget; override;

Description

CreateWidget is called automatically when the control needs to instantiate the underlying widget on which it is based. CreateWidget generates a new widget instance, and sets its handle as the value of the Handle property.

Do not call the CreateWidget method. To cause the spin edit control to create its underlying widget, call the HandleNeeded method or read the Handle property instead.


TCustomSpinEdit.EventFilter
 CLX Reference

TCustomSpinEdit.EventFilter

TCustomSpinEdit	See also

Responds to system events.

function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; override;

Description

EventFilter is called automatically in response to events detected by the underlying widget. Such events include mouse events, keyboard events, system changes (such as changes to the palette), and changes to the underlying widget (moves, resizes, or the need to repaint). EventFilter gives the control an opportunity to respond to the event that occurred.

Sender is the handle to the underlying widget that receives the event. Typically, this is the same as the Handle property.

Event is the handle to the Qt event object. Use this object to determine the type of event that occurred and obtain information about the event.

EventFilter returns True if the radio group handles the event, False otherwise.

TCustomSpinEdit overrides the inherited method to provide special handling for right mouse clicks and to ensure that the spin buttons do not get stuck in a “down” position as a result of a focus change.

Note:	When overriding the EventFilter method, be sure to call the inherited method so that the default event processing can occur.


TCustomSpinEdit.GetText
 CLX Reference

TCustomSpinEdit.GetText

TCustomSpinEdit 	See also

Returns the value of the Text property.

function GetText: TCaption; override;;

Description

GetText is the protected read implementation of the Text property. It retrieves the text of the control from the underlying widget. This consists of the value of the spin edit control with the value of Prefix prepended and Suffix appended, or the value of SpecialText if the control has the minimum value and the SpecialText property is set.


TCustomSpinEdit.HookEvents
 CLX Reference

TCustomSpinEdit.HookEvents

TCustomSpinEdit	See also

Registers callbacks for handling system event events and widget signals.

procedure HookEvents; override;

Description

HookEvents is called automatically when the underlying widget is created. It registers the callbacks that allow a control to respond to events detected by the widget.

In TCustomSpinEdit, HookEvents registers a callback that responds to notifications when the value of the control changes. After registering its own callback, HookEvents calls the inherited method, which registers the EventFilter method to respond to all system events.

Note:	When overriding the HookEvents method, be sure to call the inherited method so that ancestor classes register their own callbacks. For more information about overriding HookEvents, see TWidgetControl.HookEvents.


TCustomSpinEdit.InitWidget
 CLX Reference

TCustomSpinEdit.InitWidget

TCustomSpinEdit	See also

Initializes the underlying widget before it is displayed after it has been created.

procedure InitWidget; override;

Description

InitWidget is called internally after the CreateWidget method is called. InitWidget initializes the underlying widget prior to the widget being displayed after it has been created.

Override InitWidget to specify how the widget is to be displayed after it has been created. When overriding InitWidget, call the inherited method so that the default processing can occur.


TCustomSpinEdit.Loaded
 CLX Reference

TCustomSpinEdit.Loaded

TCustomSpinEdit 	See also

Informs the underlying widget of the Max and Min values when the spin edit control is first loaded into memory.

procedure Loaded; override;

Description

Loaded is called automatically when the form that contains the spin edit control is first loaded into memory. It provides an opportunity for controls to initialize themselves once all other controls on the form are also loaded into memory.

TCustomSpinEdit overrides the loaded method to inform the underlying widget of the values of the Max and Min properties, which are streamed into memory with the control.


TCustomSpinEdit.PaletteChanged
 CLX Reference

TCustomSpinEdit.PaletteChanged

TCustomSpinEdit	See also

Responds to changes in the palette that the spin control uses.

procedure PaletteChanged(Sender: TObject); override;

Description

PaletteChanged responds to changes in the palette that this control uses to define its colors by notifiying the underlying widgets of the new palette.

Sender is the palette object that this control uses to define the available colors and to interpret symbolic color constants.


TCustomSpinEdit.StepDown
 CLX Reference

TCustomSpinEdit.StepDown

TCustomSpinEdit 	See also

Simulates a click to the down spin button.

procedure StepDown;

Description

StepDown spins the value of the control down, as if the user clicked the down spin button or pressed the down arrow key.


TCustomSpinEdit.StepUp
 CLX Reference

TCustomSpinEdit.StepUp

TCustomSpinEdit 	See also

Simulates a click to the up spin button.

procedure StepUp;

Description

StepUp spins the value of the control up, as if the user clicked the up spin button or pressed the up arrow key.


TCustomSpinEdit.WidgetDestroyed
 CLX Reference

TCustomSpinEdit.WidgetDestroyed

TCustomSpinEdit

Responds when the underlying widget is destroyed.

procedure WidgetDestroyed; override;

Description

WidgetDestroyed is called automatically immediately after the underlying widget is destroyed. It handles all the necessary cleanup for disengaging the hooks that respond to events from the underlying widget.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomSpinEdit


TCustomAction
 CLX 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

QActnList

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. CLX 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). 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. The action list 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


 CLX Reference

TCustomAction properties

TCustomAction	Alphabetically	Legend

In TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomAction properties

TCustomAction	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


TCustomAction.Caption
 CLX Reference

TCustomAction.Caption

TCustomAction 	See also

Represents the caption of client controls and menu items.

property Caption: TCaption;

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
 CLX 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.


TCustomAction.DisableIfNoHandler
 CLX 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
 CLX 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.HelpContext
 CLX 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
 CLX 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 HyperHelp (on Linux) or WinHelp (on Windows), HelpKeyword refers to an A link.

When a client control has focus and the user presses the F1 key (or the key specified by the application’s HelpKey property), 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
 CLX 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
 CLX Reference

TCustomAction.Hint

TCustomAction	See also

Indicates the Help hint for client controls and menu items.

property Hint: WideString;

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
 CLX 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 that contains the action. It identifies an image that is associated with controls and menu items that use this action.


TCustomAction.Name
 CLX 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.ShortCut
 CLX 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
 CLX 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.


 CLX Reference

TCustomAction events

TCustomAction	Alphabetically	Legend

In TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TCustomAction events

TCustomAction	By object	Legend

OnExecute

OnHint

OnUpdate


TCustomAction.OnHint
 CLX Reference

TCustomAction.OnHint

TCustomAction	 See also

Occurs when the mouse pauses over a client control or menu item.

type THintEvent = procedure (var HintStr: WideString; 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.


 CLX 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

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX 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

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
 CLX 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
 CLX 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 list component at design time. If you want to create an action at runtime, assign a TActionList component to its ActionList property after calling Create.


TCustomAction.Destroy
 CLX 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, Destroy removes the action from that list.


TCustomAction.DoHint
 CLX Reference

TCustomAction.DoHint

TCustomAction	See also

Generates an OnHint event.

function DoHint(var HintStr: WideString): 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
 CLX 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
 CLX 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 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
 CLX 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


TCustomCheckBox
 CLX Reference

TCustomCheckBox

Hierarchy	Properties	Methods	See also

TCustomCheckBox is the ancestor of all check-box components.

Unit

QStdCtrls

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).


 CLX Reference

TCustomCheckBox properties

TCustomCheckBox	Alphabetically	Legend

In TCustomCheckBox

AllowGrayed

Checked

Handle

State

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomCheckBox Properties

TCustomCheckBox	By Object	Legend

Action

Align

AllowGrayed

Anchors

BoundsRect

Brush

Checked

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentWidget

ShowHint

Showing

State

TabOrder

TabStop

Tag

Top

Visible

Width


TCustomCheckBox.AllowGrayed
 CLX 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
 CLX 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.Handle
 CLX Reference

TCustomCheckBox.Handle

TCustomCheckBox

Returns a unique 4-byte identifier that represents the instance of the underlying Qt QCheckBox widget.

property Handle: QCheckBoxH;

Description

Handle is a 4-byte value that uniquely identifies the underlying widget instance used to implement the check box. This Handle can be used when making low-level function calls into the QT shared libraries, where the function call requires an instance pointer to a QCheckBox object.


TCustomCheckBox.State
 CLX 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.


 CLX Reference

TCustomCheckBox methods

TCustomCheckBox	Alphabetically	Legend

In TCustomCheckBox

Create

CreateWidget

GetChecked

SetChecked

StateChanged

Toggle

WantKey

Derived from TButtonControl

AccelChar

AnimateClick

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomCheckBox Methods

TCustomCheckBox	By Object	Legend

AccelChar

AfterConstruction

AnimateClick

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

CreateWidget

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetChecked

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetChecked

SetFocus

SetSubComponent

Show

StateChanged

Toggle

Update

UpdateAction

UpdateControlState

WantKey


TCustomCheckBox.Create
 CLX 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.CreateWidget
 CLX Reference

TCustomCheckBox.CreateWidget

TCustomCheckBox	See also

Creates the underlying Qt CheckBox widget.

procedure CreateWidget; override;

Description

CreateWidget creates the underlying Qt QCheckBox widget and also creates and installs the Qt event Hook object that is associated with the widget. CreateWidget should never need to be overridden in descendents of the TCustomCheckBox class. The inherited method should never be called when this method is overridden.


TCustomCheckBox.GetChecked
 CLX 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.SetChecked
 CLX 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.StateChanged
 CLX Reference

TCustomCheckBox.StateChanged

TCustomCheckBox	See also

Responds when the state of the checkbox changes.

procedure StateChanged(State: TToggleState); override;

Description

StateChanged is called automatically when the user checks the check box. It updates the State property, and then generates an OnStateChanged event.


TCustomCheckBox.Toggle
 CLX 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.


TCustomCheckBox.WantKey
 CLX Reference

TCustomCheckBox.WantKey

TCustomCheckBox	See also

Processes keystrokes.

function WantKey(Key: Integer; Shift: TShiftState; const KeyText: WideString): Boolean; override;

Description

WantKey tries to handle the keystroke message specified by the Key and Shift parameters.

Key is the integer representation of the key that the user pressed. This can be the ordinal value of the character, or a symbolic key code.

Shift indicates whether the Shift, Alt, and/or Control keys were simultaneously pressed.

KeyText is the character value of the key that was pressed.

WantKey returns True if the method handled the keystroke, False otherwise.

As implemented in TCustomCheckBox, WantKey checks whether the keystroke represents the accelerator key combination for this check box. If so, it sets focus to the check box and toggles its state.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TButtonControl

TCustomCheckBox


TCustomComboBox
 CLX Reference

TCustomComboBox

Hierarchy	Properties	Methods	Events	See also

TCustomComboBox is the base class for combobox components.

Unit

QStdCtrls

Description

Use TCustomComboBox as a base class when defining a control that represents a specializedcombo 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.

Do not create instances of TCustomComboBox. To put a combo box in a form, use a descendant of TCustomComboBox, such as TComboBox.


 CLX Reference

TCustomComboBox properties

TCustomComboBox	Alphabetically	Legend

In TCustomComboBox

AutoComplete

Canvas

CharCase

DropDownCount

DroppedDown

Duplicates

Handle

InsertMode

ItemHeight

ItemIndex

Items

MaxItems

MaxLength

SelLength

SelStart

SelText

Sorted

Style

Text

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomComboBox Properties

TCustomComboBox	By Object	Legend

Action

Align

Anchors

AutoComplete

BoundsRect

Brush

Canvas

CharCase

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DropDownCount

DroppedDown

Duplicates

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

InsertMode

ItemHeight

ItemIndex

Items

Left

MaxItems

MaxLength

Name

Owner

Parent

ParentWidget

SelLength

SelStart

SelText

ShowHint

Showing

Sorted

Style

TabOrder

TabStop

Tag

Text

Top

Visible

Width


TCustomComboBoxAutoComplete
 CLX Reference

TCustomComboBoxAutoComplete

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.

Note:	AutoComplete is case sensitive. If you do not match the case of an item in the list, it will not be completed.


TCustomComboBox.Canvas
 CLX Reference

TCustomComboBox.Canvas

TCustomComboBox	See also

Provides access to the drawing surface for owner-draw combo boxes.

property Canvas: TCanvas;

Description

Use Canvas as the drawing surface when implementing a handler for the OnDrawItem event.


TCustomComboBox.CharCase
 CLX 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.DropDownCount
 CLX Reference

TCustomComboBox.DropDownCount

TCustomComboBox	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 csSimple.


TCustomComboBox.DroppedDown
 CLX Reference

TCustomComboBox.DroppedDown

TCustomComboBox	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.

Note:	DroppedDown is meaningful only if the value of Style is not csSimple.

Note:	Do not set DroppedDown to True if the Items property is an empty list. Combo boxes can’t drop down an empty list.


TCustomComboBox.Duplicates
 CLX Reference

TCustomComboBox.Duplicates

TCustomComboBox	See also

Determines how duplicate items are handled when they are inserted into the combo box's stringlist.

property Duplicates: TDuplicates;

Description

Set Duplicates to specify how the combo box responds when the application attempts to add a string to the Items property that is already in the list. Duplicates can have any of the following values:

Value	Meaning

dupIgnore	Ignore attempts to add duplicate strings to the list.

dupError	Raise an exception when an attempt is made to add duplicate strings to the list.

dupAccept	Permit duplicate strings in the sorted list.

Note:	Setting Duplicates to dupIgnore or dupError does nothing about duplicate strings that are already in the list.


TCustomComboBox.Handle
 CLX Reference

TCustomComboBox.Handle

TCustomComboBox

Returns a unique 4-byte identifier that represents the instance of the underlying Qt QOpenComboBox widget.

property Handle: QOpenComboBoxH;

Description

Use Handle to return a typed pointer to the instance of the underlying QOpenComboBox object. This Handle can be used when making low-level function calls into the QT shared libraries, where the function call requires an instance pointer to a QOpenComboBox object.


TCustomComboBox.InsertMode
 CLX Reference

TCustomComboBox.InsertMode

TCustomComboBox	See also

Determines where items, typed in by the user, are inserted in the combo box's Items stringlist.

type TComboBoxInsertMode = (ciNone, ciTop, ciCurrent, ciBottom, ciAfterCurrent, ciBeforeCurrent);

property InsertMode: TComboBoxInsertMode;

Description

Use InsertMode to determine how the combo box responds when the user types in a new string rather than selecting one from the drop-down list. The possible values of InsertMode are:

Value	Meaning
ciNone	The string is not added to the drop-down list.
ciTop	The string is added at the top of the drop-down list.
ciCurrent	The string replaces the currently selected item.
citBottom	The string is inserted at the bottom of the drop-down list.
ciAfterCurrent	The string is inserted just after the currently selected item.
ciBeforeCurrent	The string is inserted just before the currently selected item.


TCustomComboBox.ItemHeight
 CLX 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.ItemIndex
 CLX Reference

TCustomComboBox.ItemIndex

TCustomComboBox	See also	Example

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 value of 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.

Use ItemIndex to select an item at runtime from the list. Set the value of ItemIndex to the index of the item to be selected.


TCustomComboBox.Items
 CLX Reference

TCustomComboBox.Items

TCustomComboBox	See also 	Example

Lists the 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.


TCustomComboBox.MaxItems
 CLX Reference

TCustomComboBox.MaxItems

TCustomComboBox	See also

Specifies the maximum number of items that the combo box can contain.

property MaxItems: Integer;

Description

Use MaxItems to limit the number of items that the combox box can contain. If MaxItems is smaller than the current number of items, the list is truncated at the end. If MaxItems is -1, there is no limit to the number of strings that can be added to the drop-down list.

Tip:	You can clear the combo box of items by setting MaxItems to 0.


TCustomComboBox.MaxLength
 CLX Reference

TCustomComboBox.MaxLength

TCustomComboBox	See also

Specifies the maximum number of characters the user can type into the edit portion.

property MaxLength: Integer;

Description

Use MaxLength to limit the length of the items in the combo box. MaxLength limits the length of the string in the edit portion of the combo box. If MaxLength is less than the length of the current value of the Text property, this string is truncated.

If MaxLength is -1, there is no limit to the length of the strings that can appear in the combo box.


TCustomComboBox.SelLength
 CLX Reference

TCustomComboBox.SelLength

TCustomComboBox	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.


TCustomComboBox.SelStart
 CLX Reference

TCustomComboBox.SelStart

TCustomComboBox	See also

Specifies the position of the first selected character in the edit 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.


TCustomComboBox.SelText
 CLX Reference

TCustomComboBox.SelText

TCustomComboBox	See also

Represents the selected text in the edit region.

property SelText: WideString;

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.


TCustomComboBox.Sorted
 CLX 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
 CLX Reference

TCustomComboBox.Style

TCustomComboBox	See also

Determines the display style of the combo box.

type TComboBoxStyle = (csDropDown, 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.

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.


TCustomComboBox.Text
 CLX Reference

TCustomComboBox.Text

TCustomComboBox	See also

Specifies the text string that is displayed in the edit box.

property Text: TCaption;

Description

Use the Text property to read the text of the combo box or specify a new string for the Text value. By default, Text is the string specified in the Name property.

Note:	Setting Text to a string in the drop-down list causes that item to be selected. However, the value is considered a match only if it matches in a case-sensitive manner.


 CLX Reference

TCustomComboBox events

TCustomComboBox	Alphabetically	Legend

In TCustomComboBox

OnChange

OnCloseUp

OnDrawItem

OnDropDown

OnHighlighted

OnMeasureItem

OnSelect


 CLX Reference

TCustomComboBox Events

TCustomComboBox	By Object	Legend

OnChange

OnCloseUp

OnDrawItem

OnDropDown

OnHighlighted

OnMeasureItem

OnSelect


TCustomComboBox.OnChange
 CLX Reference

TCustomComboBox.::OnChange

TCustomComboBox	See also 	Example

Occurs when the selected text changes.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to take specific action immediately after the text of the combo box changes. This event occurs when the user types a new value directly into the edit region, or when the user selects a new item from the drop-down list. The Text property gives the new value.

Note:	The OnChange event does not occur when Style is set to csDropDownList. Use OnSelect instead.

Note: OnChange only occurs in response to user actions. Changing the Text property programmatically does not trigger an OnChange event.


TCustomComboBox.OnChange
 CLX Reference

TCustomComboBox.::OnCloseUp

TCustomComboBox	See also

Occurs when the drop down list closes.

property OnCloseUp: TNotifyEvent;

Description

Write an OnCloseUp event handler to implement special processing that needs to occur only when the drop-down list closes. For example, an OnCloseUp event handler can check whether the user changed the selected item while the list was dropped down and respond accordingly.

Note:	OnCloseUp, like OnDropDown, never occurs if the combo box does not include any items.


TCustomComboBox.OnDrawItem
 CLX 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.OnDropDown
 CLX Reference

TCustomComboBox.OnDropDown

TCustomComboBox	See also 	Example

Occurs when the user opens the drop-down list 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 list is activated.

Note:	OnDropDown never occurs if the combo box does not include any items.


TCustomComboBox.OnHighlighted
 CLX Reference

TCustomComboBox.OnHighlighted

TCustomComboBox	See also

Occurs when a new item in the list becomes current.

type TComboBoxHighlightEvent = procedure(Sender: TObject; Index: Integer) of object;

property OnHighlighted: TComboBoxHighlightEvent;

Description

Write an OnHighlighted event handler to respond when the highlighted item in the list changes. For example, you can use OnHighlighted to update a status bar that provides information about the current item.

Sender is the combo box whose current item just changed.

Index is the index of the item that is now highlighted.

Note:	OnHighlighted reflects changes to the current item in the list that are not necessarily selected (that is, the text property has not yet changed.) For example, OnHighlighted occurs several times as the user cursors though the drop-down list. To respond only when an item is selected, use the OnSelect event instead.


TCustomComboBox.OnMeasureItem
 CLX Reference

TCustomComboBox.OnMeasureItem

TCustomComboBox 	See also

Occurs when an item in a csOwnerDrawVariable combo box needs to be redisplayed.

type TMeasureItemEvent = procedure(Control: TWidgetControl; 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.


TCustomComboBox.OnSelect
 CLX Reference

TCustomComboBox.OnSelect

TCustomComboBox	See also

Occurs when the user selects an item in the list.

property OnSelect: TNotifyEvent;

Description

Write an OnSelect event handler to respond when the user selects a new item in the list.


 CLX Reference

TCustomComboBox methods

TCustomComboBox	Alphabetically	Legend

In TCustomComboBox

Change

Clear

Click

CloseUp

Create

CreateWidget

CursorChanged

Destroy

DestroyWidget

DoEnter

DoExit

DrawItem

DropDown

EventFilter

Focused

FontChanged

GetText

Highlighted

HookEvents

InitWidget

KeyDown

KeyUp

ListBoxHandle

Loaded

MeasureItem

PaletteChanged

RestoreWidgetState

SaveWidgetState

Select

SelectAll

SetBounds

SetStyle

SetText

Sort

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomComboBox Methods

TCustomComboBox	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Click

ClientToParent

ClientToScreen

CloseUp

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

CreateWidget

CursorChanged

DefaultHandler

Destroy

DestroyComponents

Destroying

DestroyWidget

DisableAlign

Dispatch

DoEnter

DoExit

DragDrop

Dragging

DrawItem

DropDown

EnableAlign

EndDrag

EventFilter

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

FontChanged

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetText

HandleAllocated

HandleNeeded

HasParent

Hide

Highlighted

HookEvents

InheritsFrom

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

KeyDown

KeyUp

ListBoxHandle

Loaded

MeasureItem

MethodAddress

MethodName

NewInstance

PaletteChanged

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

RestoreWidgetState

SafeCallException

SaveWidgetState

ScaleBy

ScreenToClient

ScrollBy

Select

SelectAll

SendToBack

SetBounds

SetFocus

SetStyle

SetSubComponent

SetText

Show

Sort

Update

UpdateAction

UpdateControlState


TCustomComboBox.Change
 CLX Reference

TCustomComboBox.Change

TCustomComboBox	See also

Generates an OnChange event.

procedure Change; dynamic;

Description

Change is the protected implementation method for the OnChange event. Override this method to add additional processing when the text changes, or to block the OnChange event.

When overriding Change, call theinheritedclass's Change or Changed method.


TCustomComboBox.Clear
 CLX Reference

TCustomComboBox.Clear

TCustomComboBox	See also

Deletes all text from the edit box and all items from the Items list.

procedure Clear;

Description

Call Clear to empty the combo box at runtime.


TCustomComboBox.Click
 CLX Reference

TCustomComboBox.Click

TCustomComboBox	See also

Responds to mouse clicks.

procedure Click; override;

Description

The protected click method is called automatically when the user clicks the combo box with the mouse. Click updates the Text property so that it reflects the currently selected item before calling the inherited method, which generates an OnClick event.


TCustomComboBox.CloseUp
 CLX Reference

TCustomComboBox.CloseUp

TCustomComboBox	See also

Closes the drop-down list.

procedure CloseUp;

Description

Applications can’t call the protected CloseUp method. It is used internally to close up the drop down list when the DroppedDown property is set to False.


TCustomComboBox.Create
 CLX 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.CreateWidget
 CLX Reference

TCustomComboBox.CreateWidget

TCustomComboBox	See also

Creates the underlying widget that implements the combo box.

procedure CreateWidget; override;

Description

The CreateHandle method calls CreateWidget to perform the task of creating the underlying widget and hooking it up so that it responds to event notifications.

The  control for the combo box can be temporarily destroyed and recreated in order to set properties. Thus, CreateWidget may be called several times during the lifetime of the TCustomComboBox instance.


TCustomComboBox.CursorChanged
 CLX Reference

TCustomComboBox.CursorChanged

TCustomComboBox	See also

Responds when the Cursor property changes.

procedure CursorChanged;

Description

CursorChanged is called automatically when the Cursor property changes. It updates the underlying widgets for the combo box and its list so that they reflect the change.


TCustomComboBox.Destroy
 CLX 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.DestroyWidget
 CLX Reference

TCustomComboBox.DestroyWidget

TCustomComboBox	See also

Destroys the underlying widget the implements the combo box.

procedure DestroyWidget;

Description

DestroyWidget is used internally to destroy the underlying widget whenever necessary. This occurs when the TCustomComboBox instance is destroyed, as well as when the underlying widget must be freed and recreated to implement a property change.


TCustomComboBox.DoEnter
 CLX Reference

TCustomComboBox.DoEnter

TCustomComboBox	See also

Responds when the combo box gets input focus.

procedure DoEnter;

Description

DoEnter is called automatically when input focus switches to the combo box. DoEnter selects all of the text in the edit region, and then calls the inherited method, which generates an OnEnter event.


TCustomComboBox.DoExit
 CLX Reference

TCustomComboBox.DoExit

TCustomComboBox	See also

Responds when the combo box loses input focus.

procedure DoExit;

Description

DoExit is called automatically when input focus switches away from the combo box. DoExit deselects all of the text in the edit region, and then calls the inherited method, which generates an OnExit event.


TCustomComboBox.DrawItem
 CLX 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.DropDown
 CLX Reference

TCustomComboBox.DropDown

TCustomComboBox	See also

Drops down the combo-box’s list.

procedure DropDown; dynamic;

Description

Applications can’t call the protected DropDown method. It is used internally to drop down the Items list when the DroppedDown property is set to True.


TCustomComboBox.EventFilter
 CLX Reference

TCustomComboBox.EventFilter

TCustomComboBox	See also

Responds to system events.

function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; override;

Description

EventFilter is called automatically in response to events detected by the underlying widget. Such events include mouse events, keyboard events, system changes (such as changes to the palette), and changes to the underlying widget (moves, resizes, or the need to repaint). EventFilter gives the control an opportunity to respond to the event that occurred.

Sender is the handle to the underlying widget that receives the event. Typically, this is the same as the Handle property.

Event is the handle to the Qt event object. Use this object to determine the type of event that occurred and obtain information about the event.

EventFilter returns True if the radio group handles the event, False otherwise.

TCustomComboBox overrides the inherited method to prevent the combo box from responding to clicks on the drop-down button when the list is already dropped-down.

Note:	When overriding the EventFilter method, be sure to call the inherited method so that the default event processing can occur.


TCustomComboBox.Focused
 CLX Reference

TCustomComboBox.Focused

TCustomComboBox	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).


TCustomComboBox.FontChanged
 CLX Reference

TCustomComboBox.FontChanged

TCustomComboBox	See also

Responds when the Font property changes.

procedure FontChanged; override;

Description

The protected FontChanged method is called automatically when the Font property changes. TCustomComboBox uses this method to adjust the height of the drop-down list, if necessary.


TCustomComboBox.GetText
 CLX Reference

TCustomComboBox.GetText

TCustomComboBoxl	See also

Returns the text item being edited, or the current text item if the combo box is not editable.

function GetText: TCaption;override;

Description

GetText is the protected read implementation of the Text property. When users enter data into the control (by typing or selecting from the list), the value of the text changes.


TCustomComboBox.Highlighted
 CLX Reference

TCustomComboBox.Highlighted

TCustomComboBox	See also

Generates an OnHighlighted event.

procedure Highligted(Index: Integer); dynamic;

Description

Highlighted is called automatically when the current item in the drop-down list changes. It responds by generating an OnHighlighted event.

Index is the index of the item that just became current.


TCustomComboBox.HookEvents
 CLX Reference

TCustomComboBox.HookEvents

TCustomCombotBox	See also

Registers callbacks for handling system event events and widget signals.

procedure HookEvents; override;

Description

HookEvents is called automatically when the underlying widget is created. It registers the callbacks that allow a control to respond to events detected by the widget.

In TCustomComboBox, HookEvents registers several callbacks so that it can generate the TCustomComboBox events. Before registering its own callback, HookEvents calls the inherited method, which registers the EventFilter method to respond to all system events.

Note:	When overriding the HookEvents method, be sure to call the inherited method so that ancestor classes register their own callbacks. For more information about overriding HookEvents, see TWidgetControl.HookEvents.


TCustomComboBox.InitWidget
 CLX Reference

TCustomComboBox.InitWidget

TCustomComboBox	See also

Initializes the underlying widget before it is displayed after it has been created.

procedure InitWidget; override;

Description

InitWidget is called internally after the CreateWidget method is called. InitWidget initializes the underlying widget prior to the widget being displayed after it has been created.

Override InitWidget to specify how the widget is to be displayed after it has been created. When overriding InitWidget, call the inherited method so that the default processing can occur.


TCustomComboBox.KeyDown
 CLX Reference

TCustomComboBox.KeyDown

TCustomComboBox	See also

Responds when the user presses a key while the combo box has focus.

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 responds to the Enter or Return key by selecting the current item and closing the drop-down list, and to the Escape key by closing the drop-down list without changing the current selection.

Key is the key code of the key that the user pressed. If KeyDown changes Key to 0, no more processing occurs on the keystroke.

Shift indicates the state of the Shift, Control, and Alt keys when Key was pressed.


TCustomComboBox.KeyUp
 CLX Reference

TCustomComboBox.KeyUp

TCustomComboBox	See also

Responds when the user releases a key while the combo box has focus.

procedure KeyUp(var Key: Word; Shift: TShiftState); override;

Description

KeyDown is called automatically when the user releases a key. KeyUp handles standard navigation keystrokes before calling the inherited method, which generates an OnKeyUp event.

Key is the key code of the key that the user pressed. If KeyUp changes Key to 0, no more processing occurs on the keystroke.

Shift indicates the state of the Shift, Control, and Alt keys when Key was pressed.


TCustomComboBox.ListBoxHandle
 CLX Reference

TCustomComboBox.ListBoxHandle

TCustomComboBox	See also

Returns the handle to the drop-down list.

procedure ListBoxHandle: QListBoxH;

Description

ListBoxHandle returns a handle to the widget that manages the drop-down list portion of the combo box. Use this handle for low-level calls into the Qt shared libraries.


TCustomComboBox.Loaded
 CLX Reference

TCustomComboBox.Loaded

TCustomComboBox	See also

Performs final adjustments when the form containing the combo box 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 form that contains the combo box into memory. 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.

After calling the inherited method to allow any adjustments by the base classes, Loaded adjusts the height of the drop-down list so that it reflects the current property settings.


TCustomComboBox.MeasureItem
 CLX 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.PaletteChanged
 CLX Reference

TCustomComboBox.PaletteChanged

TCustomComboBox	See also

Responds to changes in the palette that this combo box uses.

procedure PaletteChanged(Sender: TObject); override;

Description

PaletteChanged responds to changes in the palette that this combo box uses to define its colors by notifiying the underlying widgets of the new palette.

Sender is the palette object that the combo box uses to define the available colors and to interpret symbolic color constants.


TCustomComboBox.RestoreWidgetState
 CLX Reference

TCustomComboBox.RestoreWidgetState

TCustomComboBox	See also

Restores state information to the underlying widget.

procedure RestoreWidgetState; override;

Description

RestoreWidgetState is called automatically when the underlying widget is re-created, in order to restore state information that would otherwise be lost when the widget is destroyed. This information is previously saved by a call to SaveWidgetState when the underlying widget is destroyed.


TCustomComboBox.SaveWidgetState
 CLX Reference

TCustomComboBox.SaveWidgetState

TCustomComboBox	See also

Stores state information when the underlying widget is destroyed.

procedure SaveWidgetState; override;

Description

SaveWidgetState is called automatically when the underlying widget is destroyed so that the combo box can store any state information about the widget that is going away. If the widget is then recreated, this stored information is restored by a call to the RestoreWidgetState method.


TCustomComboBox.Select
 CLX Reference

TCustomComboBox.Select

TCustomComboBox	See also

Generates an OnSelect event.

procedure Select; dynamic;

Description

Select is called automatically when the selected item in the drop-down list changes. TCustomComboBox responds by generating an OnSelect event. Descendant classes can override this method to perform additional responses.


TCustomComboBox.SelectAll
 CLX Reference

TCustomComboBox.SelectAll

TCustomComboBox	See also

Selects the entire block of text in the edit box.

procedure SelectAll;

Description

Use SelectAll to select all the text in the edit box. To select only part of the text, use the SelStart and SelLength properties.


TCustomComboBox.SetBounds
 CLX Reference

TCustomComboBox.SetBounds

TCustomComboBox	See also

Sets the Left, Top, Width, and Height properties all at once.

procedure SetBounds (ALeft, ATop, AWidth, AHeight: Integer); override;

Description

Use SetBounds to change all of the combo box 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 combo box 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.


TCustomComboBox.SetStyle
 CLX Reference

TCustomComboBox.SetStyle

TCustomComboBox	See also

Sets the Style property.

type TComboBoxStyle = (csDropDown, 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.SetText
 CLX Reference

TCustomComboBox.SetText

TCustomComboBox	See also

Set the value of the Text property.

procedure SetText (const Value: TCaption);

Description

SetText is the protected write implementation of the Text property. It updates the selected item to reflect the new value of Text.


TCustomComboBox.Sort
 CLX Reference

TCustomComboBox.Sort

TCustomComboBox	See also

Sorts the items in the drop-down list.

procedure Sort;

Description

Call Sort to sort the items in the drop-down list of the combo box.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomComboBox


TCustomControlBar
 CLX Reference

TCustomControlBar

Hierarchy	Properties	Methods	Events	See also

TCustomControlBar is the base class for control bar components.

Unit

QExtCtrls

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.

Do not create instances of TCustomControlBar. To add a control bar to a form, use TControlBar instead.


 CLX Reference

TCustomControlBar properties

TCustomControlBar	Alphabetically	Legend

In TCustomControlBar

AutoSize

BevelEdges

BevelInner

BevelOuter

ClientRect

GrabCursor

Picture

RowSize

RowSnap

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ControlCount

Controls

Enabled

Handle

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Parent

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomControlBar properties

TCustomControlBar	By object	Legend

Action

Align

Anchors

AutoSize

BevelEdges

BevelInner

BevelOuter

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

GrabCursor

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentWidget

Picture

RowSize

RowSnap

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width


TCustomControlBar.AutoSize
 CLX Reference

TCustomControlBar.AutoSize

TCustomControlBar	See also

Specifies whether the control bar resizes itself to accomodate its child controls.

property AutoSize: Boolean;

Description

Set AutoSize to True to cause the control bar to automatically adjust its size so that it fits around the controls listed in the Controls property. Set AutoSize to False to cause the control bar to retain a fixed width and height.


TCustomControlBar.BevelEdges
 CLX Reference

TCustomControlBar.BevelEdges

TCustomControlBar	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 and BevelOuter properties determine the appearance of the specified edges.


TCustomControlBar.BevelInner
 CLX Reference

TCustomControlBar.BevelInner

TCustomControlBar	See also

Specifies the cut of the inner bevel.

property BevelInner: TBevelCut;

Description

Use BevelInner to provide the control bar with a three-dimensional beveled look. A control bar has two borders on each side, an outer border drawn next to the outer edge, and an inner border drawn inside the outer border. BevelInner specifies the appearance of the inner border. It can be raised (bvRaised), lowered (bvLowered), or left off altogether (bvNone).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.

Note:	The BevelInner property has an effect only on the sides specified by the BevelEdges property.


TCustomControlBar.BevelOuter
 CLX Reference

TCustomControlBar.BevelOuter

TCustomControlBar	See also

Specifies the cut of the outer bevel.

property BevelOuter: TBevelCut;

Description

Use BevelOuter to provide the control bar with a three-dimensional beveled look. A control bar has two borders on each side, an outer border drawn next to the outer edge, and an inner border drawn inside the outer border. BevelOuter specifies the appearance of the outer border. It can be raised (bvRaised), lowered (bvLowered), or left off altogether (bvNone).

Note:	The BevelOuter property has an effect only on the sides specified by the BevelEdges property.


TCustomControlBar.ClientRect
 CLX Reference

TCustomControlBar.ClientRect

TCustomControlBar	See also

Specifies the dimensions of the control bar’s client area.

property ClientRect: TRect;

Description

Read ClientRect to find the dimensions, in pixels, of the control bar’s client area. The client area is the portion of the control bar that can contain child controls such as tool bars. It is the rectangle that represents the dimensions of the control bar, indented by the bevel edges, where (0,0) represents the upper left corner of the control bar.

A point is considered within the 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.


TCustomControlBar.GrabCursor
 CLX Reference

TCustomControlBar.GrabCursor

TCustomControlBar	See also

Specifies the image that represents the mouse pointer during drag operations.

property GrabCursor: TCursor;

Description

Use GrabCursor to specify the appearance of the mouse pointer when the user clicks on a child control of the control bar and starts a drag operation. When the user is not dragging a child control, the cursor has the value of the Cursor property instead.


TCustomControlBar.Picture
 CLX 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
 CLX 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
 CLX Reference

TCustomControlBar.RowSnap

TCustomControlBar	See also

Specifies whether controls are snapped to the control bar’s rows.

property RowSnap: Boolean;

Description

Use RowSnap to specify whether controls are snapped to the control bar’s rows when dragged. Controls that are snapped have their Top and Height properties set automatically to correspond to the control bar’s rows.


 CLX Reference

TCustomControlBar events

TCustomControlBar	Alphabetically	Legend

In TCustomControlBar

OnBandDrag

OnBandInfo

OnBandMove

OnBandPaint

OnPaint


 CLX Reference

TCustomControlBar events

TCustomControlBar	By object	Legend

OnBandDrag

OnBandInfo

OnBandMove

OnBandPaint

OnPaint


TCustomControlBar.OnBandDrag
 CLX 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
 CLX Reference

TCustomControlBar.OnBandInfo

TCustomControlBar	See also

Occurs when the control bar adjusts the 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
 CLX 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
 CLX 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
 CLX 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 draws itself, 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.


 CLX Reference

TCustomControlBar methods

TCustomControlBar	Alphabetically	Legend

In TCustomControlBar

AlignControls

ControlsListChanged

Create

Destroy

DoBandMove

DoBandPaint

DragControl

EventFilter

GetClientRect

GetControlInfo

HitTest

MouseDown

MouseMove

MouseUp

Paint

PaintControlFrame

StickControls

Derived from TCustomControl

Invalidate

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomControlBar methods

TCustomControlBar	By object	Legend

AfterConstruction

AlignControls

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

ControlsListChanged

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DoBandMove

DoBandPaint

DragControl

DragDrop

Dragging

EnableAlign

EndDrag

EventFilter

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetClientRect

GetControlInfo

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

HitTest

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

MouseDown

MouseMove

MouseUp

NewInstance

Paint

PaintControlFrame

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

StickControls

Update

UpdateAction

UpdateControlState


TCustomControlBar.AlignControls
 CLX 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 TWidgetControl 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.ControlsListChanged
 CLX Reference

TCustomControlBar.ControlsListChanged

TCustomControlBar	See also

Responds when child controls are added or removed.

procedure ControlsListChanged(Control: TControl; Inserting: Boolean); override;

Description

The protected ControlsListChanged method is called automatically when the Controls property changes. The control bar uses this method to perform internal adjustments to the internal members it uses for tracking the positions of child controls.

Control is the child control that is added or removed.

Inserting is True if Control is added, False if it is removed.


TCustomControlBar.Create
 CLX 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.Destroy
 CLX 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
 CLX 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
 CLX 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.DragControl
 CLX 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.

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.EventFilter
 CLX Reference

TCustomControlBar.EventFilter

TCustomControlBar	See also

Responds to system events.

function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; override;

Description

EventFilter is called automatically in response to events detected by the underlying widget. Such events include mouse events, keyboard events, system changes (such as changes to the palette), and changes to the underlying widget (moves, resizes, or the need to repaint). EventFilter gives the control an opportunity to respond to the event that occurred.

Sender is the handle to the underlying widget that receives the event. This is the same as the Handle property.

Event is the handle to the Qt event object. This object provides information about the event that occurred.

EventFilter returns True if the control bar handles the event, False otherwise.

TCustomControlBar overrides the inherited method to suppress the default response to paint events.

Note:	When overriding the EventFilter method, be sure to call the inherited method so that the default event processing can occur.


TCustomControlBar.GetClientRect
 CLX Reference

TCustomControlBar.GetClientRect

TCustomControlBar	See also

Returns the value of the ClientRect property.

function GetClientRect: TRect; override;

Description

GetClientRect is the protected read implementation of the ClientRect property.


TCustomControlBar.GetControlInfo
 CLX 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.HitTest
 CLX 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
 CLX 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
 CLX 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 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
 CLX 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 dropped, 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
 CLX 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
 CLX 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
 CLX 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

TWidgetControl

TCustomControl

TCustomControlBar


TCustomControl
 CLX Reference

TCustomControl

Hierarchy	Properties	Methods	See also

Base class for controls that wrap Qt widgets but perform their own rendering.

Unit

QControls

Description

In most descendents of TWidgetControl, the job of drawing the control's surface belongs to the underlying Qt widget. If a control has visible features that cannot be rendered by a Qt widget, 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 TWidgetControl, 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 TWidgetControl should be descendents of TGraphicControl instead of TCustomControl. TGraphicControl objects can render themselves with less overhead, because they do not have underlying Qt widgets.

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.


 CLX Reference

TCustomControl Properties

TCustomControl	Alphabetically	Legend

In TCustomControl

Canvas

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomControl Properties

TCustomControl	By Object	Legend

Action

Align

Anchors

BoundsRect

Brush

Canvas

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentWidget

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width


TCustomControl.Canvas
 CLX 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 Qt painter, 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.


 CLX Reference

TCustomControl methods

TCustomControl	Alphabetically	Legend

In TCustomControl

BoundsChanged

Create

CreateWidget

Destroy

DrawMask

EventFilter

Invalidate

MaskChanged

Paint

Painting

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

InsertComponent

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


 CLX Reference

TCustomControl methods

TCustomControl	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BoundsChanged

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

CreateWidget

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

DrawMask

EnableAlign

EndDrag

EventFilter

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MaskChanged

MethodAddress

MethodName

NewInstance

Paint

Painting

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TCustomControl.Create
 CLX 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
 CLX 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.BoundsChanged
 CLX Reference

TCustomControl.BoundsChanged

TCustomControl	See also

Adjusts the appearance of the control when it is resized.

procedure BoundsChanged; override;

Description

Applications cannot call this protected method. Controls call BoundsChanged internally when they are resized.

TCustomControl overrides the BoundsChanged method to ensure that any widget mask is updated to reflect the new dimensions.


TCustomControl.CreateWidget
 CLX Reference

TCustomControl.CreateWidget

TCustomControl	See also

Instantiates the underlying widget that implements the control.

procedure CreateWidget; override;

Description

CreateWidget is called automatically when the control needs to instantiate the underlying widget on which it is based. CreateWidget generates a new widget instance, and sets its handle as the value of the Handle property.

Do not call the CreateWidget method. To cause the custom control to create its underlying widget, call the HandleNeeded method or read the Handle property instead.


TCustomControl.DrawMask
 CLX Reference

TCustomControl.DrawMask

TCustomControl	See also

Creates the widget mask that the custom control uses to mask out portions of its drawing surface.

procedure DrawMask(Canvas: TCanvas); virtual;

Description

When the Masked property is True, custom controls call DrawMask to create the mask that the custom control uses. By default, this method generates a mask that prevents painting in any portion of the client area where a child control appears.

Overide this method to supply a TCustomControl descendant with a different mask. A mask is combined with the image that the Paint method renders so that any part of the mask rendered with clMask is painted, and any part with clDontMask is not painted.

Canvas is the drawing surface on which to paint the mask. DrawMask creates a two-color image that uses clMask and clDontMask.


TCustomControl.EventFilter
 CLX Reference

TCustomControl.EventFilter

TCustomControl	See also

Provides a specific paint response to a paint event for descendents of TCustomControl.

function EventFilter(Event: QEventH): Boolean; override;

Description

EventFilter overrides TWidgetControl's EventFilter and provides a specific paint response to a paint event for descendents of TCustomControl. All other events are passed on to the inherited method. In response to a paint event, EventFilter calls the Paint method. To draw the image of the control, override the Paint method.


TCustomControl.Invalidate
 CLX Reference

TCustomControl.Invalidate

TCustomControl	See also

Schedules a repaint of the control.

procedure Invalidate; override;

Description

Call Invalidate to indicate when the entire surface of the control 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 group box is actually repainted.

The actual repaint does not occur until the control is updated. To force an immediate repaint, call the Repaint method instead.


TCustomControl.MaskChanged
 CLX Reference

TCustomControl.MaskChanged

TCustomControl	See also

Updates the widget mask when the Masked property changes to True.

procedure MaskChanged; override;

Description

The protected MaskChanged method is automatically called when the value of the Masked property changes. In TCustomControl, MaskChanged checks whether the value of Masked changes to True, (that is, when the control starts using a mask), and if so, generates a new mask to use by calling the DrawMask method.


TCustomControl.Paint
 CLX 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 paint events. 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.Painting
 CLX Reference

TCustomControl.Painting

TCustomControl	See also

Generates a paint event for the underlying widget.

procedure Painting(Sender: QObjectH; EventRegion: QRegionH); override;

Description

Painting is called automatically when a paint event needs to be generated. In TCustomControl, Painting sets the clip region of its canvas, and generates the paint event.

Sender is the widget handle for the control.

EventRegion is a Qt region handle that is used to set the clip region for the paint event.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomControl


TCustomEdit
 CLX Reference

TCustomEdit

Hierarchy	Properties	Methods	Events	See also

TCustomEdit is the base class from which all edit-box and memo controls are derived.

Unit

QStdCtrls

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.


 CLX Reference

TCustomEdit properties

TCustomEdit	Alphabetically	Legend

In TCustomEdit

Alignment

AutoSelect

AutoSize

BorderStyle

CharCase

EchoMode

Handle

HideSelection

MaxLength

Modified

ReadOnly

SelLength

SelStart

SelText

Text

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomEdit Properties

TCustomEdit	By Object	Legend

Action

Align

Alignment

Anchors

AutoSelect

AutoSize

BorderStyle

BoundsRect

Brush

CharCase

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

EchoMode

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

HideSelection

Hint

Left

MaxLength

Modified

Name

Owner

Parent

ParentColor

ParentWidget

ReadOnly

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

Text

Top

Visible

Width


TCustomEdit.Alignment
 CLX Reference

TCustomEdit.Alignment

TCustomEdit

Determines how the text in the edit component is aligned.

property Alignment: TAlignment;

Description

Use Alignment to indicate text alignment in the edit box. These are the possible values:

Value	Meaning

taLeftJustify	Align text on the left side in the edit control.

taCenter	Center the text in the edit control.

taRightJustify	Align text on the right side in the edit control.


TCustomEdit.AutoSelect
 CLX 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
 CLX 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
 CLX Reference

TCustomEdit.BorderStyle

TCustomEdit

Determines whether the edit control has a single line border around the client area.

property BorderStyle: TControlBorderStyle;

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.CharCase
 CLX 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.EchoMode
 CLX Reference

TCustomEdit.EchoMode

TCustomEdit	See also

Specifies how the text in the edit control is displayed.

type TEchoMode = (emNormal, emNone, emPassword);

property EchoMode: TEchoMode;

Description

Use EchoMode to control how text is displayed as it is entered. The possible values of EchoMode are as follows:

Value	Meaning

emNormal	Characters are displayed as they are entered.

emNone	Characters are not displayed as they are entered.

emPassword	Asterisks are displayed in place of characters as they are entered.

EchoMode affects the appearance of the edit control only. The value of the Text property reflects the actual characters that are typed.

Note:	EchoMode not only affects user input text, but text inserted programmatically as well.


TCustomEdit.Handle
 CLX Reference

TCustomEdit.Handle

TCustomEdit

Returns a unique 4-byte identifier that represents the instance of the underlying Qt QLineEdit widget.

property Handle: QClxLineEditH;

Description

Use Handle to return a typed pointer to the instance of the underlying QLineEdit object. This Handle can be used when making low-level function calls into the QT shared libraries, where the function call requires an instance pointer to a QLineEdit object.


TCustomEdit.HideSelection
 CLX 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
 CLX 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 -1 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 to a value less than the number of characters currently in the edit control causes the edit control to truncate its text to MaxLength characters.

Note:	Even when MaxLength is -1, there may be limitations imposed by the operating system on the number of characters that may be entered into an edit control.


TCustomEdit.Modified
 CLX 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.ReadOnly
 CLX 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
 CLX 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. When you select text in an edit control, it is automatically copied to the clipboard.

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.

Note:	Setting SelLength to a value less than zero selects the characters to the left of SelStart.


TCustomEdit.SelStart
 CLX 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
 CLX Reference

TCustomEdit.SelText

TCustomEdit	See also 	Example

Specifies the selected portion of the edit control’s text.

property SelText: WideString;

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.


TCustomEdit.Text
 CLX Reference

TCustomEdit.Text

TCustomEdit	See also

Specifies the text string that is displayed in the edit box.

property Text: TCaption;

Description

Use the Text property to read the text of the edit box or specify a new string for the Text value. By default, Text is the string specified in the Name property.


 CLX Reference

TCustomEdit Events

TCustomEdit	By Object	Legend

In TCustomEdit

OnChange

OnReturnPressed


 CLX Reference

TCustomEdit Events

TCustomEdit	By Object	Legend

OnChange

OnReturnPressed


TCustomEdit.OnChange
 CLX 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.


TCustomEdit.OnReturnPressed
 CLX Reference

TCustomEdit.OnReturnPressed

TCustomEdit	See also

Occurs when the return or enter key is pressed.

property OnReturnPressed: TNotifyEvent;

Description

Write an OnReturnPressed event handler to take specific action whenever the return or enter key is pressed when the edit control has focus.


 CLX Reference

TCustomEdit Methods

TCustomEdit	By Object	Legend

In TCustomEdit

Change

Clear

ClearSelection

CopyToClipboard

Create

CreateWidget

CutToClipboard

EventFilter

FontChanged

GetSelLength

GetSelStart

GetSelText

GetSelTextBuf

GetText

HookEvents

InitWidget

KeyDown

Loaded

PasteFromClipboard

SelectAll

SetSelLength

SetSelStart

SetSelTextBuf

SetText

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomEdit Methods

TCustomEdit	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CreateWidget

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

EventFilter

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

FontChanged

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelLength

GetSelStart

GetSelText

GetSelTextBuf

GetTabOrderList

GetText

HandleAllocated

HandleNeeded

HasParent

Hide

HookEvents

InheritsFrom

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

KeyDown

Loaded

MethodAddress

MethodName

NewInstance

ParentToClient

PasteFromClipboard

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSelLength

SetSelStart

SetSelTextBuf

SetSubComponent

SetText

Show

Update

UpdateAction

UpdateControlState


TCustomEdit.Change
 CLX 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 system or user 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
 CLX 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
 CLX 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.


TCustomEdit.CopyToClipboard
 CLX Reference

TCustomEdit.CopyToClipboard

TCustomEdit	See also 	Example

Copies the selected text in the edit control to the Clipboard.

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 or if EchoMode is not set to emNormal. If no text is selected or if EchoMode is not set to emNormal, CopyToClipboard does nothing.


TCustomEdit.Create
 CLX 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.CreateWidget
 CLX Reference

TCustomEdit.CreateWidget

TCustomEdit	See also

Creates the underlying Qt QLineEdit widget.

procedure CreateWidget; override;

Description

CreateWidget creates the underlying Qt QLineEdit widget and also creates and installs the Qt event hook object that is associated with the widget. CreateWidget should never need to be overridden in descendents of the TCustomEdit class. The inherited method should never be called when this method is overridden.


TCustomEdit.CutToClipboard
 CLX Reference

TCustomEdit.CutToClipboard

TCustomEdit	See also 	Example

Copies the selected text to the Clipboard  and then deletes the selection.

procedure CutToClipboard;virtual;

Description

Use CutToClipboard to replace the contents of the Clipboard with the selected text while clearing the selected text. If no text is selected or if EchoMode is not set to emNormal, CutToClipboard does nothing.


TCustomEdit.EventFilter
 CLX Reference

TCustomEdit.EventFilter

TCustomEdit	See also

Responds to system events.

function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; override;

Description

EventFilter is called automatically in response to events detected by the underlying widget. Such events include mouse events, keyboard events, system changes (such as changes to the palette), and changes to the underlying widget (moves, resizes, or the need to repaint). EventFilter gives the control an opportunity to respond to the event that occurred.

Sender is the handle to the underlying widget that receives the event. Typically, this is the same as the Handle property.

Event is the handle to the Qt event object. Use this object to determine the type of event that occurred and obtain information about the event.

EventFilter returns True if the edit control handles the event, False otherwise.

TCustomEdit overrides the inherited method to provide default responses to mouse and keyboard events.

Note:	When overriding the EventFilter method, be sure to call the inherited method so that the default event processing can occur.


TCustomEdit.FontChanged
 CLX Reference

TCustomEdit.FontChanged

TCustomEdit	See also

Updates the edit control when the font changes.

procedure FontChanged; override;

Description

The protected FontChanged method is called automatically when the Font property changes. In TCustomEdit, FontChanged adjusts the height of the edit control to reflect the new font if the value of AutoSize is True.


TCustomEdit.HookEvents
 CLX Reference

TCustomEdit.HookEvents

TCustomEdit	See also

Registers callbacks for handling system event events and widget signals.

procedure HookEvents; override;

Description

HookEvents is called automatically when the underlying widget is created. It registers the callbacks that allow a control to respond to events detected by the widget.

In TCustomEdit, HookEvents first calls the inherited method, which registers the EventFilter method to respond to system events. It then registers a callback that generates the OnChange event when the text in the underlying widget changes.

Note:	When overriding the HookEvents method, be sure to call the inherited method so that ancestor classes register their own callbacks. For more information about overriding HookEvents, see TWidgetControl.HookEvents.


TCustomEdit.GetSelLength
 CLX 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  returns the difference between the starting position and the ending position.


TCustomEdit.GetSelStart
 CLX 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  returns the starting position.


TCustomEdit.GetSelText
 CLX Reference

TCustomEdit.GetSelText

TCustomEdit	See also

Returns the SelText property.

function GetSelText: WideString; 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
 CLX 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.GetText
 CLX Reference

TCustomEdit.GetText

TCustomEdit	See also

Returns the Text property.

function GetText: string; virtual;

Description

GetText is the property access method for the Text property. It is exposed as a protected method so that descendants of TCustomEdit can customize the implementation of the Text property.


TCustomEdit.InitWidget
 CLX Reference

TCustomEdit.InitWidget

TCustomEdit	See also

Initializes the underlying widget before it is displayed after it has been created.

procedure InitWidget; override;

Description

InitWidget is called internally after the CreateWidget method is called. InitWidget initializes the underlying Qt widget prior to the widget being displayed after it has been created.

TCustomEdit, InitWidget sets the properties of the edit control so that they match the default settings of the newly-created widget. In this way, any changes to the edit control (including reading in the property values of the edit control from a stream) are correctly reflected in the underlying widget.

Override InitWidget to specify how the widget is to be displayed after it has been created. When overriding InitWidget the inherited method should be called.


TCustomEdit.KeyDown
 CLX Reference

TCustomEdit.KeyDown

TCustomEdit	See also

Responds 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, before the KeyPress method.

Key is the key that was pressed. If the method changes Key to 0, processing of the keystroke stops.

Shift indicates the concurrent state of the Ctrl, Shift, and Alt keys.

TCustomEdit, KeyDown first calls the inherited method to generate an OnKeyDown event. It then checks for invalid keystrokes. If it detects one, it changes Key to 0 (stopping further processing of the keystroke) and emits a beep.


TCustomEdit.Loaded
 CLX Reference

TCustomEdit.Loaded

TCustomEdit	See also

Updates the edit control when it is first loaded into memory.

procedure Loaded; override;

Description

Loaded is called automatically when the form containing the edit control has been loaded into memory. It allows the edit control to perform any initializations once all other components on the form have also been loaded into memory.


TCustomEdit.PasteFromClipboard
 CLX Reference

TCustomEdit.PasteFromClipboard

TCustomEdit	See also

Pastes the contents of the Clipboard into edit control, replacing the current selection.

procedure PasteFromClipboard;virtual;

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, PasteFromClipboard does nothing.


TCustomEdit.SelectAll
 CLX 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.SetSelLength
 CLX 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.


TCustomEdit.SetSelStart
 CLX 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.


TCustomEdit.SetSelTextBuf
 CLX 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.SetText
 CLX Reference

TCustomEdit.SetText

TCustomEdit	See also

Sets the Text property.

procedure SetText(const Value: TCaption); override;

Description

SetText is the property access method for the Text property. It is exposed as a protected method so that descendants of TCustomEdit can customize the implementation of the Text property.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomEdit


TCustomTextBrowser
 CLX Reference

TCustomTextBrowser

Hierarchy	Properties	Methods	Events	See also

TCustomTextBrowser is the base class for rich text controls with hypertext features.

Unit

QComCtrls

Description

TCustomTextBrowser implements the features of a rich text control that includes  hypertext and MIME features.

Users can click on links to navigate to other documents and to other parts of the same document. Named anchors can be accessed with the ScrollToAnchor method. Documents visited are stored in a history list, which can be navigated using the Backward, Forward, and Home methods.

As with TCustomTextViewer, a TCustomTextBrowser control uses its MIME type Factory to classify embedded images. TCustomTextBrowser also uses the Factory to associate file name extensions with MIME types. Files with the following extensions are recognized by default:

Extension	Meaning

.htm, .html	text/html;charset=iso8859-1

.txt	text/plain (local character set used)

.xml	text/xml;charset=UTF-8

To add additional extensions, use the Factory's RegisterMimeType method. TCustomTextBrowser only refers to the MIME type in order to determine the character set. The way the contents of the file are interpreted is determined by the TextFormat method.

TCustomTextBrowser is a wrapper for the the Qt class QTextBrowser.


 CLX Reference

TCustomTextBrowser Properties

TCustomTextBrowser	Alphabetically	Legend

In TCustomTextBrowser

Handle

Derived from TCustomTextViewer

ChildHandle

Derived from TWidgetControl

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomTextBrowser Properties

TCustomTextBrowser	By Object	Legend

Action

Align

Anchors

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentWidget

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width


TCustomTextBrowser.Handle
 CLX Reference

TCustomTextBrowser.Handle

See also

Provides access to the widget handle of the control.

property Handle: QTextBrowserH;

Description

Handle is a pointer to the underlying QTextBrowser object. Do not refer to the Handle property during component creation or streaming. The underlying widget does not exist until the first time the application reads the Handle property. When this occurs, the HandleNeeded method is called automatically.

Handle is a read-only property.


 CLX Reference

TCustomTextBrowser Events

TCustomTextBrowser	Alphabetically	Legend

In TCustomTextBrowser

OnHighlightText

OnTextChanged


 CLX Reference

TCustomTextBrowser Events

TCustomTextBrowser	By Object	Legend

OnHighlightText

OnTextChanged


TCustomTextBrowser.OnHighlightText
 CLX Reference

TCustomTextBrowser.OnHighlightText

TCustomTextBrowser

Occurs when the mouse enters or leaves the area over a hypertext link.

type TRTBHighlightTextEvent = procedure (Sender: TObject; const HighlightedText: WideString) ofobject;

property OnHighlightText: TRTBHighlightTextEvent;

Description

Write an OnHighlightText event handler to provide feedback to the user when the mouse moves on or off of a hypertext link. When the mouse enters the link area, the HighlightedText parameter contains the link destination. When the mouse leaves the link area, the HighlightedText parameter contains an empty string.


TCustomTextBrowser.OnTextChanged
 CLX Reference

TCustomTextBrowser.OnTextChanged

TCustomTextBrowser

Occurs when the text for the edit control may have changed.

property OnTextChanged: TNotifyEvent;

Description

Write an OnTextChanged event handler to respond to a change in the Text property.


 CLX Reference

TCustomTextBrowser Methods

TCustomTextBrowser	Alphabetically	Legend

In TCustomTextBrowser

Backward

CanGoBackward

CanGoForward

CreateWidget

Forward

GetHandle

Home

HookEvents

LoadFromFile

ScrollToAnchor

WidgetDestroyed

Derived from TCustomTextViewer

CopyToClipboard

Create

Destroy

LoadFromStream

SelectAll

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomTextBrowser Methods

TCustomTextBrowser	By Object	Legend

AfterConstruction

Assign

Backward

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

CanGoBackward

CanGoForward

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CreateWidget

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Forward

Free

FreeInstance

FreeNotification

GetHandle

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

Home

HookEvents

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollToAnchor

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState

WidgetDestroyed


TCustomTextBrowser.Backward
 CLX Reference

TCustomTextBrowser.Backward

TCustomTextBrowser

Returns to the previous document.

procedure Backward;

Description

Backward implements the familiar hypertext "Back" feature. Backward loads the previous document in the browser history list. The current document remains in the history list, accessible by the Forward method.

If the current document is the first document in the history list, Backward does nothing. Use CanGoBackward to determine if there is a previous document to go back to.


TCustomTextBrowser.CanGoBackward
 CLX Reference

TCustomTextBrowser.CanGoBackward

TCustomTextBrowser 	See also

Indicates whether the history list contains a previous document.

function CanGoBackward: Boolean;

Description

CanGoBackward returns True if there is a document preceding the current document in the history list. If so, this document can be loaded using the Backward method. If CanGoBackward returns False, the current document is at the beginning of the history list and calling Backward does nothing.


TCustomTextBrowser.CanGoForward
 CLX Reference

TCustomTextBrowser.CanGoForward

TCustomTextBrowser 	See also

Indicates whether the history list contains a next document.

function CanGoForward: Boolean;

Description

CanGoForward returns True if there is a document following the current document in the history list. If so, this document can be loaded using the Forward method. If CanGoForward returns False, the current document is at the end of the history list and calling Forward does nothing.


TCustomTextBrowser.CreateWidget
 CLX Reference

TCustomTextBrowser.CreateWidget

TCustomTextBrowser	See also

Instantiates the underlying widget that implements the text browser.

procedure CreateWidget; override;

Description

CreateWidget is called automatically when the text browser needs to instantiate the underlying widget on which it is based. CreateWidget generates a new widget instance, and sets its handle as the value of the Handle property.

Do not call the CreateWidget method. To cause the text browser to create its underlying widget, call the HandleNeeded method or read the Handle property instead.


TCustomTextBrowser.Forward
 CLX Reference

TCustomTextBrowser.Forward

TCustomTextBrowser

Returns to the next document.

procedure Forward;

Description

Forward implements the familiar hypertext "Forward" feature. Forward loads the next document in the browser history list. The current document remains in the history list, accessible by the Backward method.

If the current document is the last document in the history list, Forward does nothing. Use CanGoForward to determine if there is a following document to go forward to.


TCustomTextBrowser.GetHandle
 CLX Reference

TCustomTextBrowser.GetHandle

TCustomTextBrowser	See also

Returns the handle of the underlying widget.

function GetHandle: QTextBrowserH;

Description

GetHandle is the protected read implementation of the Handle property. It calls the HandleNeeded method, which ensures that the underlying widget is created, and then returns the handle to that widget.


TCustomTextBrowser.Home
 CLX Reference

TCustomTextBrowser.Home

TCustomTextBrowser

Returns to the first document.

procedure Home;

Description

Home loads the first document in the history list.


TCustomTextBrowser.HookEvents
 CLX Reference

TCustomTextBrowser.HookEvents

TCustomTextBrowser	See also

Registers callbacks for handling system event events and widget signals.

procedure HookEvents; override;

Description

HookEvents is called automatically when the underlying widget is created. It registers the callbacks that allow a control to respond to events detected by the widget.

In TCustomTextBrowser, HookEvents registers the callbacks that detect when changes to the history list alter the ability to navigate forward or backward. After registering these callbacks, HookEvents calls the inherited method, which registers the EventFilter method to respond to all system events.

Note:	When overriding the HookEvents method, be sure to call the inherited method so that ancestor classes register their own callbacks. For more information about overriding HookEvents, see TWidgetControl.HookEvents.


TCustomTextBrowser.LoadFromFile
 CLX Reference

TCustomTextBrowser.LoadFromFile

TCustomTextBrowser	See also

Reads the contents of a file into the control.

procedure LoadFromFile(const AFileName: string); override;

Description

LoadFromFile copies the contents of AFileName into the Text property. Calling LoadFromFile has the same effect as assigning the file name to the FileName property.

TCustomTextBrowser re-implements LoadFromFile because of the differences between QTextView and QTextBrowser.


TCustomTextBrowser.ScrollToAnchor
 CLX Reference

TCustomTextBrowser.ScrollToAnchor

TCustomTextBrowser	See also

Scrolls to a named anchor.

procedure ScrollToAnchor(const AnchorName: WideString);

Description

ScrollToAnchor scrolls the control contents until the A element whose NAME attribute matches AnchorName is visible. If possible, ScrollToAnchor positions the A element at the top of the control, even it is already visible.

If no A element name matches AnchorName, ScrollToAnchor does nothing.


TCustomTextBrowser.WidgetDestroyed
 CLX Reference

TCustomTextBrowser.WidgetDestroyed

TCustomTextBrowser

Occurs when the underlying widget is destroyed.

procedure WidgetDestroyed; override;

Description

Override WidgetDestroyed to perform any special processing that should occur immediately after the underlying widget is destroyed.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomTextViewer

TCustomTextBrowser


TCustomTextViewer
 CLX Reference

TCustomTextViewer

Hierarchy	Properties	Methods	See also

Base class for rich text controls.

Unit

QComCtrls

Description

TCustomTextViewer is an abstract base class for rich text control classes.

Do not create instances of TCustomTextViewer. The TTextViewer class provides a generic implementation of TCustomTextViewer. You can also create your own descendent class..

TCustomTextViewer is a wrapper for the the Qt class QTextView.


 CLX Reference

TCustomTextViewer Properties

TCustomTextViewer	Alphabetically	Legend

In TCustomTextViewer

ChildHandle

DocumentTitle

Factory

FileName

Handle

IsTextSelected

LinkColor

Paper

SelectedText

Text

TextColor

TextFormat

UnderlineLink

UseDefaultFactory

Derived from TFrameControl

BorderStyle

Derived from TWidgetControl

Brush

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientOrigin

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomTextViewer Properties

TCustomTextViewer	By Object	Legend

Action

Align

Anchors

BorderStyle

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DocumentTitle

Enabled

Factory

FileName

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

IsTextSelected

Left

LinkColor

Name

Owner

Paper

Parent

ParentWidget

SelectedText

ShowHint

Showing

TabOrder

TabStop

Tag

Text

TextColor

TextFormat

Top

UnderlineLink

UseDefaultFactory

Visible

Width


TCustomTextViewer.ChildHandle
 CLX Reference

TCustomTextViewer.ChildHandle

TCustomTextViewer	See also

Handle used by child controls.

property ChildHandle: QWidgetH; library;

Description

ChildHandle is a read-only property that returns a reference to an underlying Qt control. This is the handle child controls should use when referring to the parent.

As implemented in TCustomTextViewer, ChildHandle returns the handle for viewport widget associated with the underlying QTextViewer widget.


TCustomTextViewer.DocumentTitle
 CLX Reference

TCustomTextViewer.DocumentTitle

TCustomTextViewer	See also

Document Title.

property DocumentTitle: WideString;

Description

DocumentTitle returns the document title, as specified in the TITLE attribute of the QT tag.


TCustomTextViewer.Factory
 CLX Reference

TCustomTextViewer.Factory

TCustomTextViewer

Mime factory for embedded images.

property Factory: TMimeSourceFactory;

Description

Factory determines the mime factory object used to determine file types for embedded images. If the UseDefaultFactory property is True, the Factory property always returns the value returned by the DefaultFactory function, even if assigned a different value.


TCustomTextViewer.FileName
 CLX Reference

TCustomTextViewer.FileName

TCustomTextViewer

Mime FileName for embedded images.

property FileName: TFileName;

Description

When a valid file name is assigned to the FileName property, the contents of the file are copied into the Text property.


TCustomTextViewer.Handle
 CLX Reference

TCustomTextViewer.Handle

See also

Provides access to the window handle of the control.

property Handle: QWidgetH;

Description

The Handle property returns a pointer to the underlying QTextView object. Do not refer to the Handle property during component creation or streaming. The underlying widget 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.


TCustomTextViewer.LinkColor
 CLX Reference

TCustomTextViewer.LinkColor

Is text selected?

property LinkColor: TColor;

Description

The LinkColor property determines the color used to display hypertext links if the QT take does not have a LINK attribute.


TCustomTextViewer.IsTextSelected
 CLX Reference

TCustomTextViewer.IsTextSelected

Is text selected?

property IsTextSelected: Boolean;

Description

The IsTextSelected property returns True if any text in the control is selected.

IsTextSelected is a read-only property.


TCustomTextViewer.Paper
 CLX Reference

TCustomTextViewer.Paper

Background brush.

property Paper: TBrush;

Description

The Paper property determines the TBrush object used to paint the control background.


TCustomTextViewer.SelectedText
 CLX Reference

TCustomTextViewer.SelectedText

 	See also

Text selected in control.

property SelectedText: WideString;

Description

The SelectedText property returns any text currently selected. No rich text information is provided.


TCustomTextViewer.Text
 CLX Reference

TCustomTextViewer.Text

Control raw text.

property Text: WideString;

Description

The Text property contains the raw text used to render the control contents. Changing Text immediately updates the contents of the control.

If rich text is enabled (see the TextFormat property), Text is interpreted as a rich text document using the default Qt style sheet, which supports a limited subset of HTML.Most common tags that are valid inside an HTML BODY element are supported. One important limitation is that most elements must be explicitly closed. For example, first-level headers must end with an </H1> tag.

Elements bracketed by unknown tags are ignored. This includes HEAD element tags such as <TITLE>.

The entire rich text document can optionally be bracketed by <QT> and </QT> tags in place of <HTML> or <BODY> tags. The <QT> tag can have a TITLE attribute, which sets the control's Title property. The <QT> tag also can have BGCOLOR and LINK attributes, which have the same meaning as in <BODY>.

If rich text is disabled, the contents of the Text property are displayed unchanged.


TCustomTextViewer.TextColor
 CLX Reference

TCustomTextViewer.TextColor

Default text color.

property TextColor: TColor;

Description

The TextColor property determines the default text color.


TCustomTextViewer.TextFormat
 CLX Reference

TCustomTextViewer.TextFormat

Control how text is displayed.

type TTextFormat = (tfPlainText, tfText, tfAutoText);

property TextFormat: TTextFormat;

Description

The TextFormat property determines whether the contents of the Text property are rendered as rich text or as plain text. These are the possible values:

Value	Meaning

tfAutoText	(Default.) The control attempts to determine whether Text contains rich text. If a valid tag is seen on the first line, Text is assumed to be a rich text document. Otherwise, Text is displayed as plain text.

tfText	The control assumes that Text contains rich text, even if no tags are present. Note that in rich text, any sequence consisting entirely of spaces, tabs, and line breaks counts as a single space.

tfPlainText	The control assumes that Text contains plain text.


TCustomTextViewer.UnderlineLink
 CLX Reference

TCustomTextViewer.UnderlineLink

Underline links.

property UnderlineLink: Boolean;

Description

If UnderlineLink is True (default), then hypertext links are underlined.


TCustomTextViewer.UseDefaultFactory
 CLX Reference

TCustomTextViewer.UseDefaultFactory

 	See also

Use default MIME factory.

property UseDefaultFactory: Boolean;

Description

If UseDefaultFactory is True, then the MIME factory object returned by the DefaultFactory routine is used to determine the MIME types of embeded graphic objects.


 CLX Reference

TCustomTextViewer Methods

TCustomTextViewer	Alphabetically	Legend

In TCustomTextViewer

CopyToClipboard

Create

CreateWidget

Destroy

LoadFromFile

LoadFromStream

SelectAll

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomTextViewer Methods

TCustomTextViewer	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CreateWidget

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TCustomTextViewer.CopyToClipboard
 CLX Reference

TCustomTextViewer.CopyToClipboard

TCustomTextViewer

Copies the selected text in the edit control to the Clipboard.

procedure CopyToClipboard;

Description

Use CopyToClipboard to replace the contents of the Clipboard with the selected text. CopyToClipboard does nothing if no text is selected.


TCustomTextViewer.Create
 CLX Reference

TCustomTextViewer.Create

TCustomTextViewer	See also	Example

Creates an instance of TCustomTextViewer.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create and initializeTCustomTextViewer.

AOwner is another component, typically the form, that is responsible for freeing the 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.

After calling the inherited constructor, Create takes the following steps:

Initializes the widget Brush and makes an internal routine the Brush's OnChange event handler.

Sets InputKeys to [ikArrows, ikNav].

Sets the defaults for the Width, Height, LinkColor, TextColor, TextFormat, UnderlineLink, and Color properties.


TCustomTextViewer.CreateWidget
 CLX Reference

TCustomTextViewer.CreateWidget

TCustomTextViewer	See also

Creates the underlying Qt QTextViewer widget.

procedure CreateWidget; override;

Description

CreateWidget is called automatically when the control needs to create or recreate the underlying Qt QTextViewer widget.

The inherited method should never be called when this method is overridden.


TCustomTextViewer.Destroy
 CLX Reference

TCustomTextViewer.Destroy

TCustomTextViewer	See also

Destroys an instance of TCustomTextViewer.

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 TBrush object in its Brush property.

Calls the inherited Destroy methodd.


TCustomTextViewer.LoadFromFile
 CLX Reference

TCustomTextViewer.LoadFromFile

TCustomTextViewer	See also

Read file contents into control..

procedure LoadFromFile(const AFileName: string); virtual;

Description

LoadFromFile copies the contents of AFileName into the Text property. Calling LoadFromFile has the same effect as assigning the file name to the FileName property.


TCustomTextViewer.LoadFromStream
 CLX Reference

TCustomTextViewer.LoadFromStream

TCustomTextViewer	See also

Read stream contents into control..

procedure LoadFromStream(Stream: TStream);

Description

LoadFromStream copies the contents of Stream into the Text property.


TCustomTextViewer.SelectAll
 CLX Reference

TCustomTextViewer.SelectAll

TCustomTextViewer	See also

Selects all text in the control.

procedure SelectAll;

Description

Use SelectAll to select all text in the control.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomTextViewer


TCustomForm
 CLX 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

QForms

Description

Derive from TCustomForm to create a custom window. The TCustomForm descendant can contain other objects, such as TButton, TCheckBox, and TComboBox objects.


 CLX Reference

TCustomForm properties

TCustomForm	Alphabetically	Legend

In TCustomForm

Active

ActiveControl

ActiveMDIChild

BorderIcons

BorderStyle

Canvas

ClientHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

DesignerHook

DropTarget

FocusedControl

FormState

FormStyle

Icon

KeyPreview

MDIChildCount

MDIChildren

MDIParent

Menu

ModalResult

Parent

ParentWidget

PixelsPerInch

Position

Scaled

SizeGrip

Visible

WindowState

Derived from TScrollingWidge

ChildHandle

Handle

HorzScrollBar

VertScrollBar

Derived from TWidgetControl

Brush

ControlCount

Controls

Enabled

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

Caption

Color

Constraints

ControlState

ControlStyle

Cursor

Font

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomForm properties

TCustomForm	By object	Legend

Action

Active

ActiveControl

ActiveMDIChild

Align

Anchors

BorderIcons

BorderStyle

BoundsRect

Brush

Canvas

Caption

ChildHandle

ClientHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignerHook

DesignInfo

DropTarget

Enabled

FocusedControl

Font

FormState

FormStyle

Handle

Height

HelpKeyword

HelpFile

HelpKeyword

HelpType

Hint

HorzScrollBar

Icon

KeyPreview

Left

MDIChildCount

MDIChildren

MDIParent

Menu

ModalResult

Name

Owner

Parent

ParentWidget

PixelsPerInch

Position

Scaled

ShowHint

Showing

SizeGrip

TabOrder

TabStop

Tag

Top

VertScrollBar

Visible

Width

WindowState


TCustomForm.Active
 CLX 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
 CLX Reference

TCustomForm.ActiveControl

TCustomForm	See also 	Example

Specifies the control that has focus on the form.

property ActiveControl: TWidgetControl;

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
 CLX 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.BorderIcons
 CLX 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.

Note:	On Linux, BorderIcons can only request that the window manager remove a button from the form. It is possible that the window manager may ignore that request. On Windows, setting BorderIcons can cause the form to be positioned to that the title bar is off screen.


TCustomForm.BorderStyle
 CLX 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.

Note:	Depending on the Window manager, some of these borders may result in a window that is not resizeable.


TCustomForm.Canvas
 CLX 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
 CLX 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
 CLX 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.ClientOrigin
 CLX Reference

TCustomForm.ClientOrigin

TCustomForm	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.


TCustomForm.ClientRect
 CLX 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
 CLX 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.DesignerHook
 CLX Reference

TCustomForm.DesignerHook

TCustomForm	See also

Specifies the designer interface for the form.

property DesignerHook: IDesignerHook;

Description

The DesignerHook 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
 CLX 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.FocusedControl
 CLX Reference

TCustomForm.FocusedControl

TCustomForm	See also

Returns the control that currently has focus.

property FocusedControl: TWidgetControl;

Description

Use FocusedControl to access the control that currently has focus on the form.


TCustomForm.FormState
 CLX Reference

TCustomForm.FormState

TCustomForm	See also

Indicates transitional state information about the form.

type TFormState = set of (fsCreating, fsVisible, fsShowing, fsModal, 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 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.

fsActivated	The form has received focus or the application became active but has not yet called the Activate method to generate an OnActivate event.


TCustomForm.FormStyle
 CLX 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.


TCustomForm.Icon
 CLX 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
 CLX 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
 CLX 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
 CLX 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.MDIParent
 CLX Reference

TCustomForm.MDIParent

TCustomForm	See also

Specifies the MDI parent of the form.

property MDIParent: TCustomForm;

Description

Use MDIParent to read or set the form that is the MDI parent of the form. Setting MDIParent to a form that does not have its FormStyle property set to fsMDIForm causes an exception to be raised.


TCustomForm.Menu
 CLX 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
 CLX 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.Parent
 CLX Reference

TCustomForm.Parent

TCustomForm	See also

Specifies the windowed control that contains the form.

property Parent: TWidgetControl;

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.ParentWidget
 CLX Reference

TCustomForm.ParentWidget

TCustomForm	See also

Specifies the underlying widget of the control specified in the Parent property.

property ParentWidget: QWidgetH;

Description

Use ParentWidget to access the handle of the widget, if any, that acts as a parent to this form.


TCustomForm.PixelsPerInch
 CLX 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
 CLX 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.

poDefaultPosOnly	The form displays with the size you created it at design time, but the operating system chooses its position on the screen.

poDefaultSizeOnly	The form appears in the position you left it at design time, but the operating system chooses its size.

poScreenCenter	The form remains the size you left it at design time, but is positioned in the center of the screen. Note that in multi-monitor applications, this may result in a form that does not fall entirely on one monitor, because CLX does not include any multi-monitor support.

poDesktopCenter	The form remains the size you left it at design time, but is positioned in the center of the screen.

poMainFormCenter	The form remains the size you left it at design time, but is positioned in the center of the application’s main form.  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.Scaled
 CLX 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.SizeGrip
 CLX Reference

TCustomForm.SizeGrip

TCustomForm	See also

Specifies whether a corner-grip for resizing the form is displayed.

property SizeGrip: Boolean;

Description

If the Form's BorderStyle property is set to one of the following styles, fbsSizeable, fbsToolWindow, or fbsSizeToolWin, use SizeGrip to specify whether a corner-grip for resizing the form is displayed. If SizeGrip is set to True, the size grip is displayed. Set SizeGrip to False to not have the size grip displayed.


TCustomForm.Visible
 CLX 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.WindowState
 CLX 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.


 CLX Reference

TCustomForm events

TCustomForm	Alphabetically	Legend

In TCustomForm

OnActivate

OnClose

OnCloseQuery

OnCreate

OnDeactivate

OnDestroy

OnHelp

OnHide

OnLoaded

OnPaint

OnShortCut

OnShow


 CLX Reference

TCustomForm events

TCustomForm	By object	Legend

OnActivate

OnClose

OnCloseQuery

OnCreate

OnDeactivate

OnDestroy

OnHelp

OnHide

OnLoaded

OnPaint

OnShortCut

OnShow


TCustomForm.OnActivate
 CLX 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 control switches  from another application.


TCustomForm.OnClose
 CLX 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.

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
 CLX 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
 CLX Reference

TCustomForm.OnCreate

TCustomForm	See also

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
 CLX 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
 CLX 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
 CLX Reference

TCustomForm.OnHelp

TCustomForm	See also

Occurs when the form receives a request for help.

type THelpEvent = function (HelpType: THelpType; HelpContext: Integer; HelpKeyword: string; HelpFile: string; var Handled: Boolean): Booleanof object;

property OnHelp: THelpEvent;

Description

Write an OnHelp event handler to perform special processing when the user requests help.

HelpType indicates whether the help topic is identified by context ID or by keyword.

HelpContext identifies the help topic to display when HelpType is htContext.

HelpKeyword identifies the help topic to display when HelpType is htKeyword.

HelpFile identifies the help file that contains the specified topic.

Handled returns an indication of whether the default help system should display the specified topic after the event handler exits. Set Handled to True if the event handler displays a help topic, and this prevents the application from proceeding to display the identified topic.

The event handler returns True if it succeeds, False if it fails.


TCustomForm.OnHide
 CLX 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.OnLoaded
 CLX Reference

TCustomForm.OnLoaded

TCustomForm	See also

Occurs when the form is loaded.

property OnLoaded: TNotifyEvent;

Description

Use OnLoaded to perform special processing when the form is first loaded into memory.


TCustomForm.OnPaint
 CLX 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
 CLX 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. 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
 CLX 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).


 CLX Reference

TCustomForm methods

TCustomForm	Alphabetically	Legend

In TCustomForm

ActionExecute

ActionUpdate

Activate

ActiveChanged

AfterConstruction

AlignControls

BeforeDestruction

BeginAutoDrag

ChangeScale

Close

CloseQuery

ColorChanged

ControlsListChanging

Create

CreateNew

CreateWidget

Deactivate

DefineProperties

DefocusControl

Destroy

DoClose

DoCreate

DoDestroy

DoHide

DoLoaded

DoShow

EventFilter

FocusControl

FontChanged

GetChildren

GetClientOrigin

GetClientRect

GetPaintDevice

GetParentWidget

HandleCreateException

Hide

IconChanged

InitWidget

InvokeHelp

IsShortCut

Loaded

MDIChildLeft

MDIChildTop

Notification

Paint

Painting

ParentFontChanged

QueryInterface

ReadState

Release

Resize

SetChildOrder

SetFocus

SetFocusedControl

SetInitialBounds

SetParent

Show

ShowingChanged

ShowModal

UpdateActions

ValidateRename

ViewportRect

VisibleChanging

WantKey

WidgetDestroyed

WidgetFlags

Derived from TScrollingWidget

DisableAutoRange

EnableAutoRange

ScrollBy

ScrollInView

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

Realign

RemoveControl

Repaint

ScaleBy

Update

UpdateControlState

Derived from TFrameControl

ContentsRect

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomForm methods

TCustomForm	By object	Legend

ActionExecute

ActionUpdate

Activate

ActiveChanged

AfterConstruction

AlignControls

Assign

BeforeDestruction

BeginAutoDrag

BeginDrag

BringToFront

Broadcast

CanFocus

ChangeScale

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Close

CloseQuery

ColorChanged

ContainsControl

ContentsRect

ControlAtPos

ControlsListChanging

Create

CreateNew

CreateParented

CreateParentedControl

CreateWidget

Deactivate

DefaultHandler

DefineProperties

DefocusControl

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

DoClose

DoCreate

DoDestroy

DoHide

DoLoaded

DoShow

DragDrop

Dragging

EnableAlign

EnableAutoRange

EndDrag

EventFilter

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

FocusControl

Focused

FontChanged

Free

FreeInstance

FreeNotification

GetChildren

GetClientOrigin

GetClientRect

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetPaintDevice

GetParentComponent

GetParentWidget

GetTabOrderList

HandleAllocated

HandleCreateException

HandleNeeded

HasParent

Hide

IconChanged

InheritsFrom

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

IsShortCut

Loaded

MDIChildLeft

MDIChildTop

MethodAddress

MethodName

NewInstance

Notification

Paint

Painting

ParentFontChanged

ParentToClient

QueryInterface

ReadState

Realign

ReferenceInterface

Refresh

Release

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

Resize

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendToBack

SetBounds

SetChildOrder

SetFocus

SetFocusedControl

SetInitialBounds

SetParent

SetSubComponent

Show

ShowingChanged

ShowModal

Update

UpdateAction

UpdateActions

UpdateControlState

ValidateRename

ViewportRect

VisibleChanging

WantKey

WidgetDestroyed

WidgetFlags


TCustomForm.ActionExecute
 CLX Reference

TCustomForm.ActionExecute

TCustomForm	See also

Locates a target for an action and executes the action.

function ActionExecute(var BasicAction : TBasicAction): Boolean; dynamic;

Description

ActionExecute dispatches the action specified by BasicAction when it executes. When a client control triggers BasicAction, it first attempts to execute by locating an event handler, such as the action’s OnExecute event handler. If no event handler exists, this method is called to locate a target for the action and, once a target is found, call the action’s ExecuteTarget method.

ActionExecute first attempts to use the active control as a target. If that does not work, it tries the form itself, and if that does not work, it checks all visible controls in the form until it finds one that can act as a target of the action.

If ActionExecute locates a valid target, it calls the action’s ExecuteTarget method, passing in the identified target as a parameter, and then returns True. If ActionExecute does not locate a valid target, it returns False.


TCustomForm.ActionUpdate
 CLX Reference

TCustomForm.ActionUpdate

TCustomForm	See also

Locates a target for an action and allows the action to update itself.

function ActionUpdate(var BasicAction : TBasicAction): Boolean; dynamic;

Description

When the application is idle, actions are given an opportunity to update themselves to reflect current conditions. First, the application attempts to execute by locating an event handler, such as the action’s OnUpdate event handler. If no event handler exists, this method is called to locate a target for the action, calling the action’s UpdateTarget method for each potential target until the action indicates that it has updated itself.

ActionUpdate first attempts to use the active control as a target. If that does not work, it tries the form itself, and if that does not work, it checks all visible controls in the form until it finds one that can act as a target of the action.

If the action indicates that it can update itself based on one of the targets, ActionUpdate stops searching for a target and returns True. If the action does not accept any of the potential targets, ActionUpdate returns False.


TCustomForm.Activate
 CLX Reference

TCustomForm.Activate

TCustomForm	See also

Generates an OnActivate event.

procedure Activate; dynamic;

Description

The form component calls Activate automatically 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 when the form becomes active.


TCustomForm.ActiveChanged
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TCustomForm.Close

TCustomForm	See also

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
 CLX 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.


TCustomForm.ColorChanged
 CLX Reference

TCustomForm.ColorChanged

TCustomForm	See also

Makes all necessary adjustments when the Color property changes.

procedure ColorChanged; override;

Description

ColorChanged is called internally when the color of a form is changed. As implemented in TCustomForm, ColorChanged calls the inherited ColorChanged method and then peforms its own adjusments, setting the color of the form’s size gripper and updating the properties of the form’s Canvas.


TCustomForm.ControlsListChanging
 CLX Reference

TCustomForm.ControlsListChanging

TCustomForm	See also

Responds when controls are added or removed from the form.

procedure ControlsListChanging(Control: TControl; Inserting: Boolean); override;

Description

ControlsListChanging is called automatically when the Controls property changes because a control is added to or removed from the form. It allows the form to perform all necessary adjustments to accomodate the change.

Control is the control that is added to or removed from the form.

Inserting is True when Control is added to the form and False when it is removed.


TCustomForm.Create
 CLX 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
 CLX 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 .xfm 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 .xfm file. If the form contains visual components, therefore, you must stream in an external .xfm to bind the visual components with their classes. If the newly created form has an external .xfm file, then you can follow the call to CreateNew with a call to InitInheritedComponent. If you need to create the .xfm 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 .xfm file;
2. creates a new form disassociated from any .xfm resource file;
3. streams in the external .xfm file and binds it to this new form.

WriteComponentResFile('Temp.xfm', Form1);

…

Form2 := TForm.CreateNew(Application);

ReadComponentResFile('Temp.xfm', Form2);

Warning	Using CreateNew instead of Create can cause unpredictable results because most forms are written assuming their controls will be created from the .xfm 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.CreateWidget
 CLX Reference

TCustomForm.CreateWidget

TCustomForm	See also

Creates the underlying widget for the form.

procedure CreateWidget; override;

Description

CreateWidget is called automatically when the form is created or a change to the form requires its window to be recreated. It creates the underlying widget that implements the form window, and then sets up the necessary links for communicating with that widget.


TCustomForm.Deactivate
 CLX Reference

TCustomForm.Deactivate

TCustomForm	See also

Generates an OnDeactivate event.

procedure Deactivate; dynamic;

Description

The form component automatically calls Deactivate 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.DefineProperties
 CLX 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, OldCreateOrder, TextWidth, and TextHeight properties. TForm descendants can also specify methods that read and write data other than properties by overriding the DefineProperties method.


TCustomForm.DefocusControl
 CLX Reference

TCustomForm.DefocusControl

TCustomForm	See also

Removes focus from a control on the form.

procedure DefocusControl(Control: TWidgetControl; Removing: Boolean);

Description

Use DefocusControl to remove focus from a control on the form. This method is used internally by CLX.

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
 CLX Reference

TCustomForm.Destroy

TCustomForm	See also

Removes the form from memory.

destructor Destroy; override;

Description

Do not call Destroy. Instead, call Release, which posts QEventType_CMRelease event to the form. The handler for QEventType_CMRelease calls the Free method, which in turn calls Destroy.


TCustomForm.DoClose
 CLX 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
 CLX 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
 CLX 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.DoHide
 CLX 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.DoLoaded
 CLX Reference

TCustomForm.DoLoaded

TCustomForm	See also

Generates an OnLoaded event.

procedure DoLoaded; dynamic;

Description

The form component calls DoLoaded when the form is first loaded into memory.

The default DoLoaded method calls any event handler attached by the user to the OnLoaded event.  Override DoLoaded to introduce additional responses when the form is loaded.


TCustomForm.DoShow
 CLX Reference

TCustomForm.DoShow

TCustomForm	See also

Generates an OnShow event.

procedure DoShow; dynamic;

Description

The form component calls DoShow 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.EventFilter
 CLX Reference

TCustomForm.EventFilter

TCustomForm	See also

Responds to system events.

function EventFilter(Sender: QObjectH; Event QEventH): Boolean; override;

Description

EventFilter is called automatically in response to events detected by the underlying widget. Such events include mouse events, keyboard events, system changes (such as changes to the palette), and changes to the underlying widget (moves, resizes, or the need to repaint). EventFilter gives the control an opportunity to respond to the event that occurred.

Sender is the handle to the underlying widget that receives the event. This is the same as the Handle property.

Event is the handle to the Qt event object. This object provides information about the event that occurred.

EventFilter returns True if the form handles the event, False otherwise.

TCustomForm overrides the inherited method to respond to paint events, form close events, and event notifications when the WindowState changes.

Note:	When overriding the EventFilter method, be sure to call the inherited method so that the default event processing can occur.


TCustomForm.FocusControl
 CLX Reference

TCustomForm.FocusControl

TCustomForm	See also

Sets focus to a control on the form.

procedure FocusControl(Control: TWidgetControl);

Description

Use FocusControl to set focus to a control on the form.

Control is a TWidgetControl object encapsulating the control on which to set focus. FocusControl sets the ActiveControl property.


TCustomForm.FontChanged
 CLX Reference

TCustomForm.FontChanged

TCustomForm	See also

Responds to changes in the font property.

procedure FontChanged; override;

Description

FontChanged is called automatically when the Font property changes. TCustomForm overrides the inherited method to ensure that the form’s Canvas is aware of the new font.


TCustomForm.GetChildren
 CLX 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.GetClientOrigin
 CLX Reference

TCustomForm.GetClientOrigin

TCustomForm	See also

Returns the screen coordinates of the top-left corner of the control’s client area.

function GetClientOrigin: TPoint; virtual;

Description

GetClientOrigin method is the protected method for reading the ClientOrigin property. GetClientOrigin calculates ClientOrigin by adding the form’s Left and Top values to the ClientOrigin coordinates of its parent (if any). It offsets this result by the coordinates of the Viewport (returned by the ViewportRect method).

Override GetClientOrigin to change how the ClientOrigin is calculated.


TCustomForm.GetClientRect
 CLX 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.GetPaintDevice
 CLX Reference

TCustomForm.GetPaintDevice

TCustomForm	See also

Returns the handle of the paint device used by the form.

function GetPaintDevice : QPaintDeviceH; override;

Description

GetPaintDevice returns the handle of the paint device used by the underlying widget.  This paint device is used internally to obtain information about the Canvas (for example, the number of pixels per inch).


TCustomForm.GetParentWidget
 CLX Reference

TCustomForm.GetParentWidget

TCustomForm	See also

Returns a handle to the parent widget of the form.

function GetParentWidget : QWidgetH;

QWidgetH __fastcall GetParentWidget(void);

Description

GetParentWidget is the protected access function for the ParentWidget property. It returns the handle for the widget that acts as a parent to the form.


TCustomForm.HandleCreateException
 CLX 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
 CLX Reference

TCustomForm.Hide

TCustomForm	See also 	Example

Hides the form.

procedure Hide;

Description

Hide sets the Visible property to False.


TCustomForm.IconChanged
 CLX Reference

TCustomForm.IconChanged

TCustomForm	See also

Responds when the Icon property changes.

procedure IconChanged(Sender: TObject; virtual;

Description

When the Icon property changes, IconChanged responds by informing the underlying widget of the new icon image.

IconChanged does not use the Sender parameter. It exists because IconChanged acts as an event handler for the Icon property’s OnChange event.

Warning:	Do not change the OnChange event handler of the Icon property unless you call IconChanged from the new event handler. Otherwise, the form’s implementation of the Icon property will not work correctly.


TCustomForm.InitWidget
 CLX Reference

TCustomForm.InitWidget

TCustomForm	See also

Initializes the underlying widget before it is displayed after it has been created.

procedure InitWidget; override;

Description

InitWidget is called internally after the CreateWidget method executes. InitWidget initializes the underlying widget prior to the widget being displayed, but after it has been created.

After calling the inherited method, InitWidget sends the underlying widget messages to set up the appropriate responses to mouse actions and focus changes.


TCustomForm.InvokeHelp
 CLX Reference

TCustomForm.InvokeHelp

TCustomForm	See also

Causes the form to display context-sensitive help.

procedure InvokeHelp; override;

Description

Call InvokeHelp to display context-sensitive help for the form.

InvokeHelp checks the form’s HelpType property. If HelpType is htKeyword, it displays the help topic identified by the HelpKeyWord property. If HelpType is htContext, it displays the help topic identified by the HelpContext property.


TCustomForm.IsShortCut
 CLX Reference

TCustomForm.IsShortCut

TCustomForm	See also

Processes shortcut keys when the form has focus.

function IsShortCut(Key: Integer; Shift: TShiftState; KeyText: WideString): 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).

Key is the key code for the key the user pressed.

Shift indicates the state of the Shift, Ctrl, and Alt keys.

KeyText is the character specified by the pressed key.

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
 CLX 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.MDIChildLeft
 CLX Reference

TCustomForm.MDIChildLeft

TCustomForm	See also

Returns the position that MDI children should use as a default for their left edge.

function MDIChildLeft : Integer;

Description

Applications can’t call this protected method. It is used internally to position MDI child forms.


TCustomForm.MDIChildTop
 CLX Reference

TCustomForm.MDIChildTop

TCustomForm	See also

Returns the position that MDI children should use as a default for their top edge.

function MDIChildTop : Integer;

Description

Applications can’t call this protected method. It is used internally to position MDI child forms.


TCustomForm.Notification
 CLX 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
 CLX Reference

TCustomForm.Paint

TCustomForm	See also

Generates an OnPaint event.

procedure Paint; dynamic;

Description

The form component calls Paint in response to a paint event (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.Painting
 CLX Reference

TCustomForm.Painting

TCustomForm	See also

Generates a paint event for the underlying widget.

procedure Painting(Sender: QObjectH; EventRegion: QRegionH); override;

Description

Painting is called automatically when a paint event needs to be generated. After generating the paint event, which causes the form to be painted, painting checks whether the form is in design mode, and if so, draws the grid as well.


TCustomForm.ParentFontChanged
 CLX Reference

TCustomForm.ParentFontChanged

TCustomForm	See also

Makes any necessary adjustments to the font when the Parent or ParentFont property changes.

procedure ParentFontChanged; override;

Description

ParentFontChanged is called automatically to notify the form when it may need to make adjustments that reflect the value of the ParentFont property.

If ParentFont is now True, then

If the form has a parent, ParentFontChanged changes the Font property to that of the parent.

If the form does not have a parent, ParentFontChanged changes the Font property to that of the application.


TCustomForm.QueryInterface
 CLX 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
 CLX 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 CLXstreaming system that loads and saves CLX 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
 CLX 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. 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.Resize
 CLX Reference

TCustomForm.Resize

TCustomForm

Makes any required adjustments when the form changes size.

procedure Resize; override;

Description

This protected method is called automatically when the form is resized, including when it is maximized, minimized, or restored to normal size. It makes any necessary adjustments to the underlying widget.


TCustomForm.SetChildOrder
 CLX 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
 CLX 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
 CLX Reference

TCustomForm.SetFocusedControl

TCustomForm	See also

Sets focus to a control on the form.

function SetFocusedControl(Control: TWidgetControl): 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.SetInitialBounds
 CLX Reference

TCustomForm.SetInitialBounds

TCustomForm	See also

Sets the bounds and screen position of the form based on the value of the Position property.

function SetInitialBounds; override;

Description

SetInitialBounds is called automatically by the SetBounds method. SetInitialBounds uses the values contained in the form's BoundsRect and Position properties to calculate the size and position of the form. It then uses the calculated bounds to update the underlying widget.


TCustomForm.SetParent
 CLX Reference

TCustomForm.SetParent

TCustomForm	See also

Sets the Parent property.

procedure SetParent(AParent: TWidgetControl); 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.Show
 CLX 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.ShowingChanged
 CLX Reference

TCustomForm.ShowingChanged

TCustomForm	See also

Responds just before the form's showing state changes.

procedure ShowingChanged; override;

Description

ShowingChanged is automatically called when the visibility of the form changes. If the form is currently hidden and is about to be shown, ShowingChanged calls DoShow. If the form is currently visible and is about to be hidden, ShowingChanged calls DoHide.


TCustomForm.ShowModal
 CLX 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.


TCustomForm.UpdateActions
 CLX 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.ValidateRename
 CLX 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.ViewportRect
 CLX Reference

TCustomForm.ViewportRect

TCustomForm	See also

Returns the form's viewport rectangle.

function ViewportRect: TRect; override;

Description

ViewportRect returns the bounds of the viewport, which is the widget used to manage the client area of the form.


TCustomForm.VisibleChanging
 CLX 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.WantKey
 CLX Reference

TCustomForm.WantKey

TCustomForm

Processes keystrokes.

function WantKey(Key: Integer; Shift: TShiftState; const KeyText: WideString): Boolean; override;

Description

WantKey tries to handle the keystroke message specified by the Key and Shift parameters.

Key is the integer representation of the key that the user pressed. This can be the ordinal value of the character, or a symbolic key code.

Shift indicates whether the Shift, Alt, and/or Control keys were simultaneously pressed.

KeyText is the character value of the key that was pressed.

WantKey returns True if the method handled the keystroke, False otherwise.

As implemented in TCustomForm, WantKey handles various navigation keystrokes.


TCustomForm.WidgetDestroyed
 CLX Reference

TCustomForm.WidgetDestroyed

TCustomForm	See also

Called when the underlying widget that implements the form is destroyed.

procedure WidgetDestroyed; override;

Description

WidgetDestroyed is called when the underlying widget is destroyed. It performs the necessary adjustments, such as setting the Handle and ChildHandle properties to nil.


TCustomForm.WidgetFlags
 CLX Reference

TCustomForm.WidgetFlags

TCustomForm	See also

Returns the flags to use when creating the underlying widget for the form.

function WidgetFlags: Integer; override;

Description

The protected CreateWidget  method generates the underlying widget on the form. CreateWidget calls WidgetFlags to obtain a set of widget flags that control the behavior of the widget such as how it will work, how it will paint, and so on.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TScrollingWidget

TCustomForm


TCustomFrame
 CLX Reference

TCustomFrame

Hierarchy	Properties	Methods	See also

TCustomFrame is the base class from which TFrame descends.

Unit

QForms

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.


 CLX Reference

TCustomFrame properties

TCustomFrame	Alphabetically	Legend

In TCustomFrame

Parent

Derived from TScrollingWidget

ChildHandle

Handle

HorzScrollBar

VertScrollBar

Derived from TWidgetControl

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCustomFrame properties

TCustomFrame	By object	Legend

Action

Align

Anchors

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HorzScrollBar

Left

Name

Owner

Parent

ParentWidget

ShowHint

Showing

TabOrder

TabStop

Tag

Top

VertScrollBar

Visible

Width


TCustomFrame.Parent
 CLX Reference

TCustomFrame.Parent

TControl	See also

Indicates the parent of the frame.

property Parent: TWidgetControl;

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.


 CLX Reference

TCustomFrame methods

TCustomFrame	Alphabetically	Legend

In TCustomFrame

Create

GetChildren

Notification

SetParent

Derived from TFrameControl

ContentsRect

Derived from TScrollingWidget

Destroy

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

GetParentComponent

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


 CLX Reference

TCustomFrame methods

TCustomFrame	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

DragDrop

Dragging

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetChildren

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

Notification

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendToBack

SetBounds

SetFocus

SetParent

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TCustomFrame.Create
 CLX 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.GetChildren
 CLX 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
 CLX 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
 CLX Reference

TCustomFrame.SetParent

TCustomFrame	See also

Sets the Parent property.

procedure SetParent(AParent: TWidgetControl); 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

TWidgetControl

TFrameControl

TScrollingWidget

TCustomFrame


TCustomGroupBox
 CLX Reference

TCustomGroupBox

Hierarchy	Properties	Methods	See also

TCustomGroupBox is the base class for all group-box components.

Unit

QStdCtrls

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.


 CLX Reference

TCustomGroupBox properties

TCustomGroupBox	Alphabetically	Legend

In TCustomGroupBox

Alignment

Handle

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomGroupBox Properties

TCustomGroupBox	By Object	Legend

Action

Align

Alignment

Anchors

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentWidget

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width


TCustomGroupBox.Alignment
 CLX Reference

TCustomGroupBox.Alignment

TCustomGroupBox

Determines how the title of the GroupBox component is aligned.

property Alignment: TAlignment;

Description

Set Alignment to specify how the text of the Title is justified on the upper frame line of the GroupBox control. The default alignment is taLeftJustify.


TCustomGroupBox.Handle
 CLX Reference

TCustomGroupBox.Handle

TCustomGroupBox

Returns a unique 4-byte identifier that represents the instance of the underlying Qt QGroupBox widget.

property Handle: QGroupBoxH;

Description

Use Handle to return a typed pointer to the instance of the underlying QGroupBox object. This Handle can be used when making low-level function calls into the Qt shared libraries, where the function call requires an instance pointer to a QGroupBox object.


 CLX Reference

TCustomGroupBox methods

TCustomGroupBox	Alphabetically	Legend

In TCustomGroupBox

AlignControls

Create

CreateWidget

FontChanged

GetAlignment

GetText

InitWidget

Invalidate

SetAlignment

SetText

WantKey

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomGroupBox Methods

TCustomGroupBox	By Object	Legend

AfterConstruction

AlignControls

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

CreateWidget

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

FontChanged

Free

FreeInstance

FreeNotification

GetAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetText

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetAlignment

SetBounds

SetFocus

SetSubComponent

SetText

Show

Update

UpdateAction

UpdateControlState

WantKey


TCustomGroupBox.AlignControls
 CLX Reference

TCustomGroupBox.AlignControls

TCustomGroupBox	See also

Aligns controls in the control bar.

procedure AlignControls(AControl: TControl; var ARect: TRect); override;

Description

AlignControls overrides the method introduced by TWinWidgetControl 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.


TCustomGroupBox.Create
 CLX 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.CreateWidget
 CLX Reference

TCustomGroupBox.CreateWidget

TCustomGroupBox	See also

Creates the underlying Qt GroupBox widget.

procedure CreateWidget; override;

Description

CreateWidget creates the underlying Qt QGroupBox widget and also creates and installs the Qt event Hook object that is associated with the widget. CreateWidget should never need to be overridden in descendents of the TCustomGroupBox class. The inherited method should never be called when this method is overridden.


TCustomGroupBox.FontChanged
 CLX Reference

TCustomGroupBox.FontChanged

TCustomGroupBox	See also

Performs necessary adjustments when the Font property changes.

procedure FontChanged; override;

Description

The protected FontChanged method is called automatically when the Font property changes. TCustomGroupBox uses this method to force a repaint so that the new font will be reflected.


TCustomGroupBox.GetAlignment
 CLX Reference

TCustomGroupBox.GetAlignment

TCustomGroupBox	See also

Returns the alignment of the Title of the GroupBox.

function GetAlignment: TAlignment;

Description

The GetAlignment method is the protected method for reading the Alignment property. GetAlignment returns the alignment of the Title of the GroupBox.


TCustomGroupBox.GetText
 CLX Reference

TCustomGroupBox.GetText

TCustomGroupBox	See also

Returns the Title caption of the GroupBox.

function GetText: TCaption;override;

Description

The GetText method is the protected method for reading the Caption property. GetText returns the Title caption of the GroupBox.


TCustomGroupBox.InitWidget
 CLX Reference

TCustomGroupBox.InitWidget

TCustomGroupBox	See also

Creates the underlying Qt GroupBox widget.

procedure InitWidget; override;

Description

InitWidget creates the underlying Qt QGroupBox widget and also creates and installs the Qt event Hook object that is associated with the widget. InitWidget should never need to be overridden in descendents of the TCustomGroupBox class. The inherited method should never be called when this method is overridden.


TCustomGroupBox.Invalidate
 CLX Reference

TCustomGroupBox.Invalidate

TCustomGroupBox	See also

Schedules a repaint of the group box.

procedure Invalidate; override;

Description

Call Invalidate to indicate when the entire surface of the group box 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 group box is actually repainted.

The actual repaint does not occur until the control is updated. To force an immediate repaint, call Repaint instead.


TCustomGroupBox.SetAlignment
 CLX Reference

TCustomGroupBox.SetAlignment

TCustomGroupBox	See also

Sets the alignment of the Title of the GroupBox

procedure SetAlignment(const Value: TAlignment;

Description

The SetAlignment method is the protected method for writing the Alignment property. SetAlignment sets the alignment of the Title of the GroupBox.


TCustomGroupBox.SetText
 CLX Reference

TCustomGroupBox.SetText

TCustomGroupBox	See also

Sets the Title caption of the GroupBox.

procedure SetText(const Value: TCaption); override;

Description

The SetText method is the protected method for writing the Caption property. SetText sets the Title caption of the GroupBox.


TCustomGroupBox.WantKey
 CLX Reference

TCustomGroupBox.WantKey

TCustomGroupBox	See also

Processes keystrokes.

function WantKey(Key: Integer; Shift: TShiftState; const KeyText: WideString): Boolean; override;

Description

WantKey tries to handle the keystroke message specified by the Key and Shift parameters.

Key is the integer representation of the key that the user pressed. This can be the ordinal value of the character, or a symbolic key code.

Shift indicates whether the Shift, Alt, and/or Control keys were simultaneously pressed.

KeyText is the character value of the key that was pressed.

WantKey returns True if the method handled the keystroke, False otherwise.

As implemented in TCustomGroupBox, WantKey checks whether the keystroke represents the accelerator key for the group box. If so, it selects the first item in the group and returns True.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomGroupBox


TCustomGrid
 CLX Reference

TCustomGrid

Hierarchy	Properties	Methods	See also

TCustomGrid is the base type for all components that present information in a two-dimensional grid.

Unit

QGrids

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.


 CLX Reference

TCustomGrid properties

TCustomGrid	Alphabetically	Legend

In TCustomGrid

BorderSize

BorderStyle

ClientRect

Col

ColCount

ColWidths

DefaultColWidth

DefaultDrawing

DefaultRowHeight

EditorMode

FixedColor

FixedCols

FixedRows

GridHeight

GridLineWidth

GridWidth

InplaceEditor

LeftCol

Options

Row

RowCount

RowHeights

ScrollBars

ScrollBarsLocked

Selection

TabStops

TopRow

VisibleColCount

VisibleRowCount

VScrollBar

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomGrid properties

TCustomGrid	By object	Legend

Action

Align

Anchors

BorderSize

BorderStyle

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Col

ColCount

ColWidths

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DefaultColWidth

DefaultDrawing

DefaultRowHeight

DesignInfo

EditorMode

Enabled

FixedColor

FixedCols

FixedRows

GridHeight

GridLineWidth

GridWidth

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HScrollBar

InplaceEditor

Left

LeftCol

Name

Options

Owner

Parent

ParentColor

ParentWidget

Row

RowCount

RowHeights

ScrollBars

ScrollBarsLocked

Selection

ShowHint

Showing

TabOrder

TabStop

TabStops

Tag

Top

TopRow

Visible

VisibleColCount

VisibleRowCount

VScrollBar

Width


TCustomGrid.BorderSize
 CLX Reference

TCustomGrid.BorderSize

TCustomGrid 	See also

Returns the size of the border around the grid.

property BorderSize: Integer;

Description

Applications can’t use this protected property. TCustomGrid uses BorderSize internally to adjust for the border when painting or scrolling.

BorderSize indicates the width, in pixels, of the border specified by the BorderStyle property.


TCustomGrid.BorderStyle
 CLX Reference

TCustomGrid.BorderStyle

TCustomGrid

Determines whether a single line border is drawn around the grid.

property BorderStyle: TControlBorderStyle;

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.ClientRect
 CLX Reference

TCustomGrid.ClientRect

TCustomGrid	See also

Indicates the size (in pixels) of a grid’s client area.

property ClientRect: TRect;

Description

Read ClientRect to obtain the size of the grid’s client area. The client area is the surface of the grid, omitting any border or scrollbars. ClientRect is equivalent to Rect(0, 0, ClientWidth, ClientHeight).

Note:	ClientRect is the size of the physical client area of the grid, not its logical client area. If the grid supports scrolling, the ClientRect is not the entire scrolling range, but only the region that is visible at any time.


TCustomGrid.Col
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TCustomGrid.GridWidth
 CLX 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.HScrollBar
 CLX Reference

TCustomGrid.HScrollBar

TCustomGrid	See also

Provides access to the horizontal scrollbar.

property HScrollBar: TGridScrollBar;

Description

Applications can’t use this protected property. It is exposed as a protected property so that descendant classes can interact with the horizontal scroll bar.


TCustomGrid.InplaceEditor
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.ScrollBarsLocked
 CLX Reference

TCustomGrid.ScrollBarsLocked

TCustomGrid	See also

Indicates whether scrolling the grid causes the scrollbars to update themselves.

property ScrollBarsLocked: Boolean;

Description

Applications can’t use this protected property. It is used internally to prevent recursion in updates to the scroll bars. When ScrollBarsLocked is True, the grid does not update the scrollbars when informed that the contents scrolled. When ScrollBarsLocked is False, the grid updates the scrollbars when informed that the contents scrolled.


TCustomGrid.Selection
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TCustomGrid.VScrollBar
 CLX Reference

TCustomGrid.VScrollBar

TCustomGrid	See also

Provides access to the vertical scrollbar.

property VScrollBar: TGridScrollBar;

Description

Applications can’t use this protected property. It is exposed as a protected property so that descendant classes can interact with the vertical scroll bar. For example, TDBGrid uses the VScrollBar property to implement the use of the vertical scroll bar for data events.


 CLX Reference

TCustomGrid methods

TCustomGrid	Alphabetically	Legend

In TCustomGrid

AdjustSize

BeginColumnDrag

BeginRowDrag

BoundsChanged

BoxRect

CalcDrawInfo

CalcFixedInfo

CalcScrollBarVisible

CalcSizingState

CanEditAcceptKey

CanEditModify

CanEditShow

CanGridAcceptKey

CellRect

CheckColumnDrag

CheckRowDrag

ColumnMoved

ColWidthsChanged

Create

CreateEditor

DefineProperties

DeleteColumn

DeleteRow

CreateScrollBar

Destroy

DoEnter

DoExit

DoMouseWheelDown

DoMouseWheelUp

DrawCell

EndColumnDrag

EndRowDrag

FontChanged

GetClientRect

GetEditLimit

GetEditMask

GetEditText

GetGridHeight

GetGridWidth

GridKeyPress

HideEditor

InvalidateCell

InvalidateCol

InvalidateEditor

InvalidateRow

KeyDown

KeyPress

ModifyScrollBar

MouseCoord

MouseDown

MouseMove

MouseUp

MoveColRow

MoveColumn

MoveRow

Paint

PtInGrid

RowHeightsChanged

RowMoved

ScrollData

SelectCell

SetEditText

ShowEditor

ShowEditorChar

SizeChanged

Sizing

TimedScroll

TopLeftChanged

UpdateDesigner

UpdateScrollBars

VisibleChanged

WidgetFlags

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

ExecuteAction

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


 CLX Reference

TCustomGrid methods

TCustomGrid	By object	Legend

AdjustSize

AfterConstruction

Assign

BeforeDestruction

BeginColumnDrag

BeginDrag

BeginRowDrag

BoundsChanged

BoxRect

BringToFront

Broadcast

CalcDrawInfo

CalcFixedInfo

CalcScrollBarVisible

CalcSizingState

CanEditAcceptKey

CanEditModify

CanEditShow

CanFocus

CanGridAcceptKey

CellRect

CheckColumnDrag

CheckRowDrag

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ColumnMoved

ColWidthsChanged

ContainsControl

ControlAtPos

Create

CreateEditor

CreateParented

CreateParentedControl

CreateScrollBar

DefaultHandler

DefineProperties

DeleteColumn

DeleteRow

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DoEnter

DoExit

DoMouseWheelDown

DoMouseWheelUp

DragDrop

Dragging

DrawCell

EnableAlign

EndColumnDrag

EndDrag

EndRowDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

FontChanged

Free

FreeInstance

FreeNotification

GetClientRect

GetEditLimit

GetEditMask

GetEditText

GetGridHeight

GetGridWidth

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GridKeyPress

HandleAllocated

HandleNeeded

HasParent

Hide

HideEditor

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateCell

InvalidateCol

InvalidateEditor

InvalidateRect

InvalidateRow

InvokeHelp

IsImplementorOf

KeyDown

KeyPress

MethodAddress

MethodName

ModifyScrollBar

MouseCoord

MouseDown

MouseMove

MouseUp

MoveColRow

MoveColumn

MoveRow

NewInstance

Paint

ParentToClient

PtInGrid

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

RowHeightsChanged

RowMoved

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollData

SelectCell

SendToBack

SetBounds

SetEditText

SetFocus

SetSubComponent

Show

ShowEditor

ShowEditorChar

SizeChanged

Sizing

TimedScroll

TopLeftChanged

Update

UpdateAction

UpdateControlState

UpdateDesigner

UpdateScrollBars

VisibleChanged

WidgetFlags


TCustomGrid.AdjustSize
 CLX 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
 CLX 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
 CLX 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.BoundsChanged
 CLX Reference

TCustomGrid.BoundsChanged

TCustomGrid	See also

Responds when the size or position of the grid changes.

procedure BoundsChanged; override;

Description

Applications can’t call this protected method. It is called automatically when the size or position of the grid changes. TCustomGrid overrides the inherited method to update its scroll bars when the bounds change.


TCustomGrid.BoxRect
 CLX 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
 CLX 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
 CLX 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.CalcScrollBarVisible
 CLX Reference

TCustomGrid.CalcScrollBarVisible

TCustomGrid	See also

Indicates whether the grid needs to display a specified scrollbar.

function CalcScrollBarVisible(ScrollBar: TScrollStyle; const AxisInfo: TGridAxisDrawInfo; Max: Integer): Boolean; dynamic;

Description

Call CalcScrollBarVisible to determine whether a specified scrollbar should be displayed. CalcScrollBarVisible returns True if

The specified scroll bar is enabled using the ScrollBars property.

The grid contains more rows (or columns) than can be visible at one time.

ScrollBar indicates whether information is sought about the horizontal (ssHorizontal) or vertical (ssVertical) scrollbar.

AxisInfo provides information about the specified scroll bar.

Max indicates the number of rows or columns in the grid in the indicated direction.


TCustomGrid.CalcSizingState
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.CheckColumnDrag
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.CreateScrollBar
 CLX Reference

TCustomGrid.CreateScrollBar

TCustomGrid	See also

Creates the object that implements the horizontal or vertical scroll bar.

function CreateScrollBar: TGridScrollBar; virtual;

Description

Applications can’t call this protected method. It is called internally to create the objects that implement the protected HScrollBar and VScrollBar properties.


TCustomGrid.DefineProperties
 CLX 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
 CLX 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
 CLX 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
 CLX 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.DoEnter
 CLX Reference

TCustomGrid.DoEnter

TCustomGrid	See also

Updates the grid when it receives input focus.

procedure DoEnter; override;

DYNAMIC void __fastcall DoEnter(void);

Description

DoEnter is called automatically when the grid receives input focus. In TCustomGrid, DoEnter checks whether the grid is in a mode to allow editing, and if so, forwards the focus to the inplace editor. If the grid is not being edited, DoEnter generates an OnEnter event.


TCustomGrid.DoExit
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.FontChanged
 CLX Reference

TCustomGrid.FontChanged

TCustomGrid	See also

Responds when the Font property changes.

procedure FontChanged; override;

Description

FontChanged is called automatically when the grid’s Font property changes. In TCustomGrid, FontChanged updates the inplace editor to reflect the new font.


TCustomGrid.GetClientRect
 CLX Reference

TCustomGrid.GetClientRect

TCustomGrid	See also

Returns a rectangle defining the client area of the grid.

function GetClientRect: TRect; override;

Description

GetClientRect is the protected read implementation of the ClientRect property.


TCustomGrid.GetEditLimit
 CLX 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
 CLX 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.GetEditText
 CLX 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
 CLX 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
 CLX 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.GridKeyPress
 CLX Reference

TCustomGrid.GridKeyPress

TCustomGrid	See also

Provides special processing when the user presses a key.

procedure GridKeyPress(var Key: Char); virtual;

Description

After generating an OnKeyPress event, GridKeyPress toggles the EditorMode property when the user presses the Enter key. GridKeyPress is called by the KeyPress method.


TCustomGrid.HideEditor
 CLX 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
 CLX Reference

TCustomGrid.InvalidateCell

TCustomGrid	See also

Invalidates the region occupied by a cell so that it will be repainted.

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
 CLX Reference

TCustomGrid.InvalidateCol

TCustomGrid	See also

Invalidates the region occupied by a column so that it will be repainted.

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
 CLX 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.InvalidateRow
 CLX Reference

TCustomGrid.InvalidateRow

TCustomGrid	See also

Invalidates the region occupied by a row so that it will be repainted.

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
 CLX 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
 CLX 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.

KeyPress generates an OnKeyPress event, and handles communication with the inplace editor, forwarding keystrokes and toggling the EditorMode when the user presses the Enter key.


TCustomGrid.ModifyScrollBar
 CLX Reference

TCustomGrid.ModifyScrollBar

TCustomGrid	See also

Updates the scroll bars when the grid is scrolled.

procedure ModifyScrollBar(ScrollBar: TScrollBarKind; ScrollCode: TScrollCode!Alink(tscrollcode_type,1,TopicNotFound,main); Pos: Cardinal; UseRightToLeft: Boolean); virtual;

Description

ModifyScrollBar is called automatically when the grid needs to update its scroll bars.

ScrollBar indicates which scroll bar to update.

ScrollCode indicates what type of scrolling caused the need to update.

Pos indicates the new position of the scroll bar when ScrollCode is scPosition or scTrack.

UseRightToLeft indicates whether the scroll bar should reverse the direction of scrolling. FOr example, when UseRightToLeft is True, a ScrollCode of scLineUp moves the current row down one rather than up one.


TCustomGrid.MouseCoord
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 needs to render its image. 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.PtInGrid
 CLX Reference

TCustomGrid.PtInGrid

TCustomGrid

Indicates whether the specified mouse coordinates represent a point in the client area of the grid.

function PtInGrid(p: TPoint): Boolean; virtual;

Description

PtInGrid is used internally to determine when mouse messages should be handled by the grid.

p specifies the coordinates of a point (in client coordinates for the grid).

PtInGrid adjusts p to take into acount the border of the grid and check whether the resulting adjusted point is in the client area of the grid. PtInGrid returns True if p lies in the client area of the grid, False if p is not in the client area.


TCustomGrid.RowHeightsChanged
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TCustomGrid.ShowEditorChar

TCustomGrid	See also

Displays the inplace editor, with its text set to the specified character.

procedure ShowEditorChar(var 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TCustomGrid.UpdateScrollBars
 CLX Reference

TCustomGrid.UpdateScrollBars

TCustomGrid	See also

Updates the properties of the scroll bars to reflect the current dimensions of the grid.

procedure UpdateScrollBars;

Description

TCustomGrid calls UpdateScrollBars internally when the ScrollBars property changes or when the dimensions of the grid change. UpdateScrollBars then sets the dimensions of any visible scroll bars to reflect the current dimensions of the grid.


TCustomGrid.VisibleChanged
 CLX Reference

TCustomGrid.VisibleChanged

TCustomGrid	See also

Responds when the Visible property changes.

procedure VisibleChanged; override;

Description

VisibleChanged is called automatically when the Visible property changes. In TCustomGrid, VisibleChanged performs any necessary adjustments when the grid changes from invisible to visible.


TCustomGrid.WidgetFlags
 CLX Reference

TCustomGrid.WidgetFlags

TCustomGrid	See also

Returns the flags to use when creating the widget that implements the grid.

function WidgetFlags: Integer; override;

Description

The protected CreateWidget method generates the underlying widget that implements the grid. (This is the widget to which the Handle property refers.) CreateWidget calls WidgetFlags to obtain a set of widget flags that control the behavior of the widget’s window.

TCustomGrid overrides the inherited method to add flags that prevent repaints from erasing the grid’s background.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomControl

TCustomGrid


TCustomHeaderControl
 CLX Reference

TCustomHeaderControl

Hierarchy	Properties	Methods	Events	See also

TCustomHeaderControl represents a spreadsheet-style header.

Unit

QComCtrls

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.

TCustomHeaderControl is a wrapper for the the Qt class QHeader


 CLX Reference

TCustomHeaderControl Properties

TCustomHeaderControl	Alphabetically	Legend

In TCustomHeaderControl

Canvas

Clickable

DragReorder

Handle

Images

Orientation

Resizable

Sections

Tracking

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomHeaderControl Properties

TCustomHeaderControl	By Object	Legend

Action

Align

Anchors

BoundsRect

Brush

Canvas

ChildHandle

Clickable

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragReorder

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Images

Left

Name

Orientation

Owner

Parent

ParentWidget

Resizable

Sections

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Tracking

Visible

Width


TCustomHeaderControl.Canvas
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

 $TCustomHeaderControl.Handle

TCustomHeaderControl

Provides access to underlying Qt widget.

property Handle: QHeaderH;

Description

The Handle property is a pointer to the QHeader widget that underlies a TCustomHeaderControl


TCustomHeaderControl.Images
 CLX 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.Orientation
 CLX Reference

TCustomHeaderControl.Orientation

TCustomHeaderControl

Control text orientation.

Type THeaderOrientation = (hoHorizontal, hoVertical);

property Orientation: THeaderOrientation;

Description

Control the the orientation of header text by setting this property to hoHorizontal (default) or hoVertical.


TCustomHeaderControl.Resizable
 CLX Reference

TCustomHeaderControl.Resizable

TCustomHeaderControl

Control column resizing.

property Resizable: Boolean;

Description

If Resizable is true (default), the user can resize individual columns.


TCustomHeaderControl.Sections
 CLX 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.Tracking
 CLX Reference

TCustomHeaderControl.Tracking

TCustomHeaderControl	See Also

Control tracking events.

property Tracking: Boolean;

Description

If Tracking is true (default), a stream of OnSectionResize events occur while the user is resizing a column. If Tracking is false, a single OnSectionResize event occurs when the user releases the mouse button.


 CLX Reference

TCustomHeaderControl Events

TCustomHeaderControl	Alphabetically	Legend

In TCustomHeaderControl

OnSectionClick

OnSectionMoved

OnSectionResize

Derived from TControl

OnMouseDown

OnMouseMove

OnMouseUp

OnResize


 CLX Reference

TCustomHeaderControl Events

TCustomHeaderControl	By Object	Legend

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnSectionClick

OnSectionMoved

OnSectionResize


TCustomHeaderControl.OnSectionClick
 CLX 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.OnSectionMoved
 CLX Reference

TCustomHeaderControl.OnSectionMoved

TCustomHeaderControl

Respond to moved sections

property OnSectionMoved: TSectionNotifyEvent;

Description

The OnSectionMoved event occurs after the user moves a header section to a new postion.


TCustomHeaderControl.OnSectionResize
 CLX 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.


 CLX Reference

TCustomHeaderControl Methods

TCustomHeaderControl	Alphabetically	Legend

In TCustomHeaderControl

AssignTo

ChangeBounds

ColumnClicked

ColumnMoved

ColumnResized

Create

CreateWidget

Destroy

GetHandle

ImageListChanged

InitWidget

Notification

RestoreWidgetState

SaveWidgetState

Derived from TWidgetControl

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomHeaderControl Methods

TCustomHeaderControl	By Object	Legend

AfterConstruction

Assign

AssignTo

BeforeDestruction

BeginDrag

BringToFront

CanFocus

ChangeBounds

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ColumnClicked

ColumnMoved

ColumnResized

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

CreateWidget

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetHandle

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

ImageListChanged

InheritsFrom

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

Notification

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

RestoreWidgetState

SafeCallException

SaveWidgetState

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TCustomHeaderControl.AssignTo
 CLX Reference

TCustomHeaderControl.AssignTo

TCustomHeaderControl	See also

Overrides the inherited AssignTo method.

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 TCustomHeaderControl, AssignTo add support for assigning to another TCustomHeaderControl. AssignTo creates a corresponding set of sections in the other control and uses each section’s Assign method to copy its own sections’ states.


TCustomHeaderControl.ChangeBounds
 CLX Reference

TCustomHeaderControl.ChangeBounds

TCustomHeaderControl	See also

Implement bounds change.

procedure ChangeBounds(ALeft, ATop, AWidth, AHeight: Integer); override;

Description

TCustomHeaderControl overrides ChangeBounds to invalidate the control after the bounds change.


TCustomHeaderControl.ColumnClicked
 CLX Reference

TCustomHeaderControl.ColumnClicked

TCustomHeaderControl

Respond to column click.

procedure ColumnClicked(Section: TCustomHeaderSection); dynamic;

Description

ColumnClicked is called automatically when the user clicks on one of the header sections. As implemented in TCustomHeaderControl, ColumnClicked calls the OnSectionClick event handler, if defined.


TCustomHeaderControl.ColumnMoved
 CLX Reference

TCustomHeaderControl.ColumnMoved

TCustomHeaderControl

Respond to column move.

procedure ColumnMoved(Section: TCustomHeaderSection); dynamic;

Description

ColumnMoved is called automatically when the user resizes a header section. As implemented in TCustomHeaderControl, ColumnMoved calls the OnSectionMoved event handler, if defined.


TCustomHeaderControl.ColumnResized
 CLX Reference

TCustomHeaderControl.ColumnResized

TCustomHeaderControl

Respond to column resize.

procedure ColumnResized(Section: TCustomHeaderSection); dynamic;

Description

ColumnResized is called automatically when the user resizes a header section. As implemented in TCustomHeaderControl, ColumnResized calls the OnSectionResize event handler, if defined.


TCustomHeaderControl.Create
 CLX 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.CreateWidget
 CLX Reference

TCustomHeaderControl.CreateWidget

TCustomHeaderControl

Create the underlying Qt Widget.

procedure CreateWidget; override;

Description

CreateWidget creates the Qt QHeader control that underlies a TCustomHeaderControl object. CreateWidget is called as needed in TWidgetControl. This action happens as needed and may happen more than once. Do not make assumptions about when CreateWidget is called.


TCustomHeaderControl.Destroy
 CLX 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.GetHandle
 CLX Reference

TCustomHeaderControl.GetHandle

TCustomHeaderControl

function GetHandle: QHeaderH; virtual;

Description

GetHandle is the protected implementation of the Handle property. Override GetHandle to change this implementation.


TCustomHeaderControl.ImageListChanged
 CLX Reference

TCustomHeaderControl.ImageListChanged

TCustomHeaderControl 	See also

Respond to change in image list.

procedure ImageListChanged; dynamic;

Description

ImageListChanged is called automatically when the control's image list has changed. As implemented in TCustomHeaderControl, ImageListChanged updates the icon for each section. Descendent classes can modify or extend this behavior.


TCustomHeaderControl.InitWidget
 CLX Reference

TCustomHeaderControl.InitWidget

TCustomHeaderControl 	See also

Initializes the underlying Qt widget

procedure InitWidget; override;

Description

TCustomHeaderControl overrides InitWidget in order to synchronize the Clickable, Resizable, Tracking, and DragReorder properties to the corresponding properties of the underlying QHeader widget.


TCustomHeaderControl.Notification
 CLX 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.


TCustomHeaderControl.RestoreWidgetState
 CLX Reference

TCustomHeaderControl.RestoreWidgetState

TCustomHeaderControl 	See also

Restore state information to underlying Qt widget.

procedure RestoreWidgetState; override;

Description

TCustomHeaderControl overrides RestoreWidgetState in order to restore the header sections.


TCustomHeaderControl.SaveWidgetState
 CLX Reference

TCustomHeaderControl.SaveWidgetState

TCustomHeaderControl

Save state information from underlying Qt widget.

procedure SaveWidgetState; override;

Description

TCustomHeaderControl overrides SaveWidgetState in order to save the header sections.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomHeaderControl


TCustomHeaderSection
 CLX Reference

TCustomHeaderSection

Hierarchy	Properties	Methods	See also

Spreadsheet-style headers.

Unit

QComCtrls

Description

TCustomHeaderControl uses TCustomHeaderSections to maintain a collection of TCustomHeaderSection objects. These TCustomHeaderSection objects represent resizable column headers. Each column header includes a text label and possibly a graphic image.

TCustomHeaderSection is an abstract base class and is not instantiated directly. Instead, concrete subclasses, such as THeaderSection and TListColumn, are used.


 CLX Reference

TCustomHeaderSection Properties

TCustomHeaderSection	Alphabetically	Legend

In TCustomHeaderSection

AllowClick

AllowResize

AutoSize

DisplayName

ImageIndex

Left

MaxWidth

MinWidth

Right

Width

Derived from TCollectionItem

Collection

ID

Index


 CLX Reference

TCustomHeaderSection Properties

TCustomHeaderSection	By Object	Legend

AllowClick

AllowResize

AutoSize

Collection

DisplayName

ID

ImageIndex

Index

Left

MaxWidth

MinWidth

Right

Width


TCustomHeaderSection.AllowClick
 CLX Reference

TCustomHeaderSection.AllowClick

TCustomHeaderSection	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.


TCustomHeaderSection.AllowResize
 CLX Reference

TCustomHeaderSection.AllowResize

TCustomHeaderSection

Allow individual column resizing.

property AllowResize: Boolean;

Description

If AllowResize is true (default), the user can resize the column by dragging the section header boundries.


TCustomHeaderSection.AutoSize
 CLX Reference

TCustomHeaderSection.AutoSize

TCustomHeaderSection 	See also

Enable automatic header resizing.

property AutoSize: Boolean;

Description

Descendent classes can set AutoSize to True to enable autosizing. TCustomHeaderSection.AutoSize is a protected property and should not be set in application code. But descendent classes can implement their own AutoSize properties.

If AutoSize is True, the header section is automatically resized to accomodate caption and icon. If AutoSize is False, the header section size is obtained from the Width property.


TCustomHeaderSection.DisplayName
 CLX Reference

TCustomHeaderSection.DisplayName

TCustomHeaderSection

The name displayed in the Collection editor.

property DisplayName: string;

Description

TCustomHeaderSection overrides DisplayName so that the header caption, if defined, is returned. If the caption is not defined, the property is equivalent to the inherited DisplayName property.


TCustomHeaderSection.ImageIndex
 CLX Reference

TCustomHeaderSection.ImageIndex

TCustomHeaderSection

Specify header section.index.

property ImageIndex: TImageIndex;

Description

Descendent classes can set ImageIndex to specify the header section icon from the collection specified by the header's Images property. TCustomHeaderSection.ImageIndex is a protected property and should not be set in application code. But descendent classes can implement their own ImageIndex properties.


TCustomHeaderSection.Index
 CLX Reference

TCustomHeaderSection.Index

TCustomHeaderSection

Return item's index.

propertyIndex: Integer;

Description

Index is a read-only property that returns the item's position in the containing TCustomHeaderSections collection. The Index property also corresponds to the index of the header section in the underlying QHeader control.


TCustomHeaderSection.Left
 CLX Reference

TCustomHeaderSection.Left

TCustomHeaderSection	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.


TCustomHeaderSection.MaxWidth
 CLX Reference

TCustomHeaderSection.MaxWidth

TCustomHeaderSection	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.


TCustomHeaderSection.MinWidth
 CLX Reference

TCustomHeaderSection.MinWidth

TCustomHeaderSection	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.


TCustomHeaderSection.Right
 CLX Reference

TCustomHeaderSection.Right

TCustomHeaderSection	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.


TCustomHeaderSection.Width
 CLX Reference

TCustomHeaderSection.Width

TCustomHeaderSection	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.


 CLX Reference

TCustomHeaderSection Methods

TCustomHeaderSection	Alphabetically	Legend

In TCustomHeaderSection

AddSection

AssignTo

Create

Resubmit

SetWidthVal

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


 CLX Reference

TCustomHeaderSection Methods

TCustomHeaderSection	By Object	Legend

AddSection

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

Resubmit

SafeCallException

SetWidthVal


TCustomHeaderSection.AddSection
 CLX Reference

TCustomHeaderSection.AddSection

TCustomHeaderSection	See Also

function AddSection: Integer; virtual;

Description

AddSection is called automatically when the section is added to the custom header. As implemented in TCustomHeaderSection, AddSection creates the corresponding section in the underlying QHeader widget.


TCustomHeaderSection.AssignTo
 CLX Reference

TCustomHeaderSection.::AssignTo

TCustomHeaderSection	See also

Specialized AssignTo

procedure AssignTo(Dest: TPersistent); override;

Description

Do not call the protected AssignTo method. 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.


TCustomHeaderSection.Create
 CLX Reference

TCustomHeaderSection.Create

TCustomHeaderSection	See Also

Resynchronize

constructor Create(Collection: TCollection); override;

Description

TCustomHeaderSection is an abstract class and should not be instantiated in application code. Concrete subclasses, such as THeaderSection and TListColumn, call the TCustomHeaderSection constructor in their own constructors.

After calling the inherited constructor, the TCustomHeaderSection constructor initializes the object properties..


TCustomHeaderSection.Resubmit
 CLX Reference

TCustomHeaderSection.::Resubmit

TCustomHeaderSection

Resubmit information to Qt widget.

procedure Resubmit; virtual;

Description

Resubmit is called automatically when state information for the underlying Qt widget may be out of date for this header section.


TCustomHeaderSection.SetWidthVal
 CLX Reference

TCustomHeaderSection.::SetWidthVal

TCustomHeaderSection 	See Also

Respond to change in Width.

procedure SetWidthVal(const Value: Integer); virtual;

Description

SetWidthVal is called automatically when a value is assigned to the Width property. SetWidthVal is responsible for changing whatever state information corresponds to the Width property. The value assigned to Width may be modified before being passed to SetWidthVal, if the value violated the constraints imposed by MaxWidth and MinWidth.

In TCustomHeaderSection, the Width property corresponds to an internal variable, and SetWidthVal is responsible for setting that variable. Descendent classes normally override SetWidthVal in order to coordinate state information with underlying Qt widgets.


Hierarchy

TObject

TPersistent

TCollectionItem

TCustomHeaderSection


TCustomHeaderSections
 CLX Reference

 TCustomHeaderSections

Hierarchy	Properties	Methods	See also

TCustomHeaderSections is a container for THeaderSection objects.

Unit

QComCtrls

Description

Each TCustomHeaderSections holds a collection of TCustomHeaderSection objects in a TCustomHeaderControl. TCustomHeaderSections 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.

TCustomHeaderSections is an abstract base class and is not instantiated directly. Instead, concrete subclasses, such as THeaderSections and TListColumns, are used.


 CLX Reference

TCustomHeaderSections Properties

TCustomHeaderSections	Alphabetically	Legend

In TCustomHeaderSections

Items

Derived from TCollection

Count

ItemClass


 CLX Reference

TCustomHeaderSections Properties

TCustomHeaderSections	By Object	Legend

Count

ItemClass

Items


TCustomHeaderSections.Items
 CLX Reference

 TCustomHeaderSections.Items

TCustomHeaderSections	See also

Provides indexed access to the items in the collection.

property Items[Index: Integer]: TCustomHeaderSection;

Description

Use Items to access individual header sections in the collection. Indexes start at zero. The value of the Index parameter corresponds to the Index property of TCustomHeaderSection.


 CLX Reference

TCustomHeaderSections Methods

TCustomHeaderSections	Alphabetically	Legend

In TCustomHeaderSections

Create

Update

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


 CLX Reference

TCustomHeaderSections Methods

TCustomHeaderSections	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

Update


TCustomHeaderSections.Create
 CLX Reference

TCustomHeaderSections.Create

TCustomHeaderSections

Instantiate a TCustomHeaderSections object.

constructor Create(HeaderControl: TCustomHeaderControl; SectionClass: THeaderSectionClass);

Description

TCustomHeaderSections is an abstract class and should not be instantiated in application code. Concrete subclasses, such as THeaderSections, call the TCustomHeaderSection constructor in their own constructors.

After passing SectionClass to the inherited constructor, the constructor records HeaderControl as the owner of the TCustomHeaderSections object.


TCustomHeaderSections.Update
 CLX Reference

 TCustomHeaderSections.Update

TCustomHeaderSections	See also

Updates the collection to reflect changes to its items.

procedure Update(Item: TCustomHeaderSectionsItem); override;

Description

TCustomHeaderSections overrides Update in order to coordinate collection information with the underlying Qt widget.


Hierarchy

TObject

TPersistent

TCollection

TCustomHeaderSections


TCustomIniFile
 CLX Reference

TCustomIniFile

Hierarchy	Properties	Methods	See also

TCustomIniFile is the abstract base class for components that encapsulate access to INI.

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.

Do not create instances of TCustomIniFile. Instead, use or create descendants of TCustomIniFile, such as TIniFile and TMemIniFile.


 CLX Reference

TCustomIniFile properties

TCustomIniFile	Alphabetically	Legend

In TCustomIniFile

FileName


 CLX Reference

TCustomIniFile properties

TCustomIniFile	By object	Legend

FileName


TCustomIniFile.FileName
 CLX 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.


 CLX 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


 CLX 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
 CLX 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.


TCustomIniFile.DeleteKey
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TCustomIniFile.ReadSectionValues

TCustomIniFile	See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TCustomLabel
 CLX Reference

TCustomLabel

Hierarchy	Properties	Methods	See also

TCustomLabel is the base class for  controls that display text or bitmaps on a form.

Unit

QStdCtrls

Description

Use TCustomLabel as a base class when defining objects that display text or bitmaps that users can’t edit. TCustomLabel introduces several new properties and methods to control the appearance of the text.

If a bitmap is set, the bitmap is drawn in the ClientRect area of the label.

Do not create instances of TCustomLabel. To put a label on a form, use a TLabel object.


 CLX Reference

TCustomLabel properties

TCustomLabel	Alphabetically	Legend

In TCustomLabel

Alignment

AutoSize

Caption

FocusControl

Handle

Layout

ShowAccelChar

Transparent

WordWrap

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomLabel Properties

TCustomLabel	By Object	Legend

Action

Align

Alignment

Anchors

AutoSize

BoundsRect

Brush

Caption

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

FocusControl

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Layout

Left

Name

Owner

Parent

ParentWidget

ShowAccelChar

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Transparent

Visible

Width

WordWrap


TCustomLabel.Alignment
 CLX 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
 CLX 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 or bitmap. When AutoSize is False, the label is fixed in size. When AutoSize is True, the size of the label readjusts whenever the text or bitmap 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.Caption
 CLX Reference

TCustomLabel.Caption

TCustomLabel

Specifies the text string that the Label displays.

property Caption: TCaption;

Description

Use Caption to specify the text that the Label displays.

To underline a character in a Caption, include the ampersand (&) before the character. This type of character is called an accelerator character. The user can then select the control associated with the FocusControl property by pressing Alt while typing the underlined character.


TCustomLabel.FocusControl
 CLX Reference

TCustomLabel.FocusControl

TCustomLabel	See also

Designates a windowed control associated with the label.

property FocusControl: TWidgetControl;

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.Handle
 CLX Reference

TCustomLabel.Handle

TCustomLabel

Provides access to the unique 4-byte identifier that represents the instance of a Qt QLabel object.

property Handle: QLabelH;

Description

The Handle property provides access to the unique 4-byte identifier that represents the instance of a QT QLabel object.

Use Handle to return a typed pointer to the instance of the underlying QLabel object. This Handle can be used when making low-level function calls into the Qt shared libraries, where the function call requires an instance pointer to a QLabel object.


TCustomLabel.Layout
 CLX 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
 CLX Reference

TCustomLabel.ShowAccelChar

TCustomLabel	See also

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
 CLX 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
 CLX 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.


 CLX Reference

TCustomLabel methods

TCustomLabel	Alphabetically	Legend

In TCustomLabel

Create

CreateWidget

FontChanged

GetLabelText

GetText

InitWidget

Loaded

Notification

SetAutoSize

SetBounds

SetText

TextChanged

WantKey

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomLabel Methods

TCustomLabel	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

CreateWidget

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

FontChanged

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLabelText

GetNamePath

GetParentComponent

GetTabOrderList

GetText

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

Loaded

MethodAddress

MethodName

NewInstance

Notification

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetAutoSize

SetBounds

SetFocus

SetSubComponent

SetText

Show

TextChanged

Update

UpdateAction

UpdateControlState

WantKey


TCustomLabel.Create
 CLX 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.CreateWidget
 CLX Reference

TCustomLabel.CreateWidget

TCustomLabel	See also

Creates the underlying Qt QLabel widget used by the TCustomLabel component.

procedure CreateWidget; override;

Description

The CreateWindowHandle method calls CreateWidget to perform the actual task of generating a widget instance. To set how the widget is to be displayed after it has been created, override the InitWidget method.


TCustomLabel.FontChanged
 CLX Reference

TCustomLabel.FontChanged

TCustomLabel	See also

Responds when the Font property changes.

procedure FontChanged; override;

Description

FontChanged is called automatically when the Font property changes. TCustomLabel uses this notification to resize the label if the AutoSize property is set to True.


TCustomLabel.GetLabelText
 CLX Reference

TCustomLabel.GetLabelText

TCustomLabel	See also

Returns the value of the Caption property.

function GetLabelText: WideString; virtual;

Description

Call GetLabelText to obtain the string that appears as the text of the label.

Note:	GetLabelText is provided for compatibility with the TLabel control that appears in the DelphiC++Builder VCL. The property getter for the Caption property is the GetText method.


TCustomLabel.GetText
 CLX Reference

TCustomLabel.GetText

TCustomLabel	See also

Returns the value of the Caption property.

function GetText: TCaption; override;

Description

GetText is the protected access method for the Caption property. It is exposed as a protected method so descendants can override it to change the implementation of the Caption property.


TCustomLabel.InitWidget
 CLX Reference

TCustomLabel.InitWidget

TCustomLabel	See also

Initializes the underlying Qt QLabel widget before it is displayed after it has been created.

procedure InitWidget; override;

Description

InitWidget is called internally after the CreateWidget method is called. InitWidget initializes the underlying Qt widget prior to the widget being displayed after it has been created.

Override InitWidget to specify how the widget is to be displayed after it has been created. When overriding InitWidget the inherited method should be called.


TCustomLabel.Loaded
 CLX 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
 CLX 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.SetAutoSize
 CLX Reference

TCustomLabel.SetAutoSize

TCustomLabel	See also

Sets the AutoSize property.

procedure SetAutoSize(Value: Boolean); virtual;

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.


TCustomLabel.SetBounds
 CLX Reference

TCustomLabel.SetBounds

TCustomLabel	See also

Sets the position and size of the label in a single operation.

procedure SetBounds (ALeft, ATop, AWidth, AHeight: Integer); override;

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.


TCustomLabel.SetText
 CLX Reference

TCustomLabel.SetText

TCustom	See also

Set the value of the Caption property.

procedure SetText(const Value: TCaption); override;

Description

SetText is the protected access method for the Caption property. It is exposed as a protected method so descendants can override it to change the implementation of the Caption property.


TCustomLabel.TextChanged
 CLX Reference

TCustomLabel.TextChanged

TCustom	See also

Responds when the Caption property changes.

procedure TextChanged; override;

Description

TextChanged is called automatically when the Text property changes. TCustomLabel uses this method to resize the label if AutoSize is True.


TCustomLabel.WantKey
 CLX Reference

TCustomLabel.WantKey

TCustomLabel	See also

Processes keystrokes.

function WantKey(Key: Integer; Shift: TShiftState; const KeyText: WideString): Boolean; override;

Description

WantKey tries to handle the keystroke message specified by the Key and Shift parameters.

Key is the integer representation of the key that the user pressed. This can be the ordinal value of the character, or a symbolic key code.

Shift indicates whether the Shift, Alt, and/or Control keys were simultaneously pressed.

KeyText is the character value of the key that was pressed.

WantKey returns True if the method handled the keystroke, False otherwise.

As implemented in TCustomLabel, WantKey checks whether Key is the accelerator key in this label’s caption. If so, it sets focus to the control specified by FocusControl.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomLabel


TCustomLCDNumber
 CLX Reference

TCustomLCDNumber

Hierarchy	Properties	Methods	See also

TCustomLCDNumber is the base class for all LCDNumber components.

Unit

QStdCtrls

Description

Use TCustomLCDNumber as a base class when defining a control that displays numeric information in a digit display form.

The display can show the following digits and other symbols: 0/O, 1, 2, 3, 4, 5/S, 6, 7, 8, 9/g, minus, decimal point, A, B, C, D, E, F, h, H, L, o, P, r, u, U, Y, colon, degree sign (which is specified as single quote in the string) and space. QLCDNumber substitutes spaces for illegal characters.

Do not use TCustomLCDNumber directly in an application. Instead, use a descendant class such as TLCDNumber.


 CLX Reference

TCustomLCDNumber properties

TCustomLCDNumber	Alphabetically	Legend

In TCustomLCDNumber

AutoSize

Digits

Handle

Mode

PointSize

SegmentStyle

Value

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomLCDNumber Properties

TCustomLCDNumber	By Object	Legend

Action

Align

Anchors

AutoSize

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Digits

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Mode

Name

Owner

Parent

ParentWidget

PointSize

SegmentStyle

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Value

Visible

Width


TCustomLCDNumber.AutoSize
 CLX Reference

TCustomLCDNumber.AutoSize

TCustomEdit	See also

Determines whether the LCD number control automatically resizes itself to accommodate the value.

property AutoSize: Boolean;

Description

Use AutoSize to make the control adjust its size automatically so that it displays all the digits it needs to represent the Value property using the display mode specified by the Mode property.

When AutoSize is False, the control has a fixed size. When AutoSize is True, the size of the control is readjusted whenever the Value property changes.


TCustomLCDNumber.Digits
 CLX Reference

TCustomLCDNumber.Digits

TCustomLCDNumber 	See also

Indicates the maximum number of digits that the LCD number control can display.

type

  TNumDigits = 0..99;

property Digits: TNumDigits;

Description

Use Digits to get or set the maximum number of digits that the LCD number control can display.

If the string contained in the Value property contains a decimal point and PointSize is set to ptSmall, the decimal point is displayed between the actual digits and does not affect the number of digits needed to display the entire value. If PointSize is set to ptLarge, the decimal point occupies a digit position and reduces the number of digits that can be displayed by one.

If the length of the string contained in the Value property exceeds the maximum number of digits specified by Digits, TCustomLCDNumber responds in one of two ways, depending on the AutoSize property:

If AutoSize is True, the LCD number control automatically increases Digits to accomodate the needed number of digits.

If AutoSize is False, the LCD number control generates an OnOverflow event, and the displayed string is truncated to the number of digits specified by this property. The underlying content of the Value property is not affected.


TCustomLCDNumber.Handle
 CLX Reference

TCustomLCDNumber.Handle

TCustomLCDNumber

Specifies the handle of the underlying widget.

property Handle: QLCDNumberH;

Description

Handle is a 4-byte identifier that uniquely represents the underlying widget instance. Use this handle when making low-level function calls into the QT shared libraries, where the function call requires an instance pointer to a QLCDNumber object.


TCustomLCDNumber.Mode
 CLX Reference

TCustomLCDNumber.Mode

TCustomLCDNumber	See also

Determines the numeric base that the component uses to display the contents of the Value property.

type

  TLCDMode = (lcdHexadecimal, lcdDecimal, lcdOctal, lcdBinary);

property Mode: TLCDMode;

Description

Set Mode to specify the numeric base to use when formatting the value for display. Setting Mode does not change the contents of the Value property, only the way it appears on the screen to the user. The default is lcdDecimal.

The following table lists the possible values:

Mode	Description

lcdHexadecimal	Displays Value as a hexadecimal number (Base 16).

lcdDecimal	Displays Value as a octal number (Base 8).

lcdOctal	Displays Value as a decimal number (Base 10).

lcdBinary	Displays Value as a binary number (Base 2).

All four modes can display both integers, floating-point numbers and strings (subject to the character set limitations, see the Value property for the specified limitations).


TCustomLCDNumber.PointSize
 CLX Reference

TCustomLCDNumber.PointSize

TCustomLCDNumber 	See also

Determines how the decimal point is displayed.

type

  TLCDPointSize = (ptSmall, ptLarge);

property PointSize: TLCDPointSize;

Description

Set PointSize to specify how the LCD Number control displays the decimal point. If PointSize is ptSmall, the decimal point is displayed between the actual digits and does not affect the number of digits that can be displayed, as specified by the Digits property. If PointSize is ptLarge, the decimal point occupies a digit position and increases the number of digits required to display Value by one.


TCustomLCDNumber.SegmentStyle
 CLX Reference

TCustomLCDNumber.SegmentStyle

TCustomLCDNumber

Specifies how the LCD number control displays its segments.

type

  TLCDSegmentStyle = (ssOutline, ssFilled, ssFlat);

property SegmentStyle: TLCDSegmentStyle;

Description

Use SegmentStyle to specify how the segments are drawn. SegmentStyle can be one of the following values:

SegmentStyle	Description

ssOutline	Displays raised segments filled with the background color.

ssFilled	Displays raised segments filled with the foreground color.

ssFlat	Displays flat segments filled with the foreground color.


TCustomLCDNumber.Value
 CLX Reference

TCustomLCDNumber.Value

TCustomLCDNumber	See also

Specifies the value that the control displays.

property Value: WideString;

Description

Use Value to specify the value that the control displays, as a text string. Value can contain any character. However, the control can only display the following characters:

Character type	Legal characters

Numeric	0-9

Alphabetical	A,B,C,D,E,F,g,h,H,L,o,O,P,r,S,u,U,Y

Punctuation	Colon, degree sign (which is specified as single quote in the string), minus sign, decimal point and space.

A space is substituted for all other characters that a string may contain.

If an application assigns a value that has a length greater than the number of digits specified by the Digits property, one of two things happens:

If AutoSize is True, the value of Digits is changed to accomodate the new value. Note that in this case, Value must represent a numeric value.

If AutoSize is False, TCustomLCDNumber generates an OnOverflow event.


 CLX Reference

TCustomLCDNumber events

TCustomLCDNumber	Alphabetically	Legend

In TCustomLCDNumber

OnOverflow


 CLX Reference

TCustomLCDNumber events

TCustomLCDNumber	By object	Legend

OnOverflow


TCustomLCDNumber.OnOverflow
 CLX Reference

TCustomLCDNumber.OnOverflow

TCustomLCDNumber	See also

Occurs when the text assigned to the LCD number control requires more digits than allowed by the Digits property.

property OnOverflow: TNotifyEvent;

Description

Write an OnOverflow event handler to take specific action when the application assigns a value that is too large to be displayed. For example, use this event to display an error message that indicates that the value is not as it appears.


 CLX Reference

TCustomLCDNumber methods

TCustomLCDNumber	Alphabetically	Legend

In TCustomLCDNumber

ColorChanged

Create

CreateWidget

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomLCDNumber Methods

TCustomLCDNumber	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ColorChanged

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

CreateWidget

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TCustomLCDNumber.ColorChanged
 CLX Reference

TCustomLCDNumber.ColorChanged

TWidgetControl	See also

Informs the underlying widget when the Color property changes.

procedure ColorChanged; override;

Description

ColorChanged is called internally when the Color property changes.

TCustomLCDNumber responds to this notification by informing the underlying widget of the color change so that it can correctly render the background color.


TCustomLCDNumber.CreateWidget
 CLX Reference

TCustomLCDNumber.CreateWidget

TCustomLCDNumber	See also

Creates the underlying widget that implements the LCD number control.

procedure CreateWidget; override;

Description

CreateWidget is called automatically when the LCD number control needs to instantiate the underlying widget on which it is based. CreateWidget generates a new widget instance, sets its handle as the value of the Handle property.

Do not call the CreateWidget method. To cause the LCD number control to create its underlying widget, call the HandleNeeded method or read the Handle property instead.


TCustomLCDNumber.TCustomLCDNumber
 CLX Reference

TCustomLCDNumber.Create

TCustomLCDNumber	See also

Creates and initializes a TCustomLCDNumber instance.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an LCD number control at runtime. TCustomLCDNumber descendants added to forms at design time are created automatically.

AOwner specifies the component (typically a form) that is responsible for freeing the TLCDNumber instance.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomLCDNumber


TCustomListView
 CLX Reference

TCustomListView

Hierarchy	Properties	Methods	Events	See also

TCustomListView is the base type for all list view components, including TListView.

Unit

QComCtrls

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.

Do not create instances of TCustomListView. To put a list view on a form, use a descendant of TCustomListView, such as TListView.

TCustomListView is a wrapper for the Qt class QListView.


 CLX Reference

TCustomListView Properties

TCustomListView	Alphabetically	Legend

In TCustomListView

CheckBoxes

DropTarget

ItemFocused

Items

Selected

TopItem

ViewStyle

Derived from TCustomViewControl

ReadOnly

SortDirection

Derived from TFrameControl

ClientOrigin

Derived from TWidgetControl

Brush

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomListView Properties

TCustomListView	By Object	Legend

Action

Align

Anchors

BoundsRect

Brush

CheckBoxes

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DropTarget

Enabled

Height

HelpContext

HelpKeyword

HelpType

Hint

ItemFocused

Items

Left

Name

Owner

Parent

ParentWidget

ReadOnly

Selected

ShowHint

Showing

SortDirection

TabOrder

TabStop

Tag

Top

TopItem

ViewStyle

Visible

Width


TCustomListView.Checkboxes
 CLX 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.DropTarget
 CLX 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.::ItemFocused
 CLX 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.Items
 CLX 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.


TCustomListView.Selected
 CLX 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.TopItem
 CLX 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.ViewStyle
 CLX Reference

TCustomListView.ViewStyle

TCustomListView	See also	Example

Determines how the list items are displayed.

type TViewStyle = (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

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.


 CLX Reference

TCustomListView Events

TCustomListView	Alphabetically	Legend

In TCustomListView

OnChange

OnChanging

OnDeletion

OnDrawItem

OnEdited

OnEditing

OnGetImageIndex

OnInsert

OnItemClick

OnItemDoubleClick

OnItemEnter

OnItemExitViewportEnter

OnItemMouseDown

OnSelectItem

OnViewPortMouseDown


 CLX Reference

TCustomListView Events

TCustomListView	By Object	Legend

OnChange

OnChanging

OnDeletion

OnDrawItem

OnEdited

OnEditing

OnGetImageIndex

OnInsert

OnItemClick

OnItemDoubleClick

OnItemEnter

OnItemExitViewportEnter

OnItemMouseDown

OnSelectItem

OnViewPortMouseDown


TCustomListView.OnChange
 CLX Reference

TCustomListViewOnChange

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
 CLX 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.OnDeletion
 CLX 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
 CLX Reference

TCustomListView.OnDrawItem

TCustomListView	See also

Occurs when an item should be drawn in the list view.

property OnDrawItem: TListViewDrawItemEvent;

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
 CLX 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
 CLX 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
 CLX 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.OnInsert
 CLX 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.


TCustomListView.OnItemClick
 CLX Reference

TCustomListView.OnItemClick

TCustomListView 	See Also

Occurs when an item is clicked.

type TLVItemClickEvent = procedure(Sender: TObject; Button: TMouseButton; Item: TListItem; Pt: TPoint; ColIndex: Integer) of object;

property OnItemClick: TLVItemClickEvent;

Description

Use OnItemClick to respond to mouse clicks. The OnClick event can also be triggered by keyboard or menu events that are equivalent to mouse clicks. See TControl.OnClick.

The Button parameter indicates which mouse button generated the event. Item is the item the user clicked. Pt gives the client-area location of the click. ColIndex indicates the column containing the item.


TCustomListView.OnItemDoubleClick
 CLX Reference

TCustomListView.OnItemDoubleClick

TCustomListView

Occurs when an item is double-clicked.

type TLVItemDoubleClickEvent = procedure(Sender: TObject; Item: TListItem) of object;

property OnItemDoubleClick: TLVItemDoubleClickEvent;

Description

Use OnItemDoubleClick to respond to double clicks on an item.

The Item parameter identifies the item that was double-clicked.


TCustomListView.OnItemEnter
 CLX Reference

TCustomListView.OnItemEnter

TCustomListView

Occurs when an the mouse pointer enters the item's space.

type TLVItemEnterEvent = procedure(Sender: TObject; Item: TListItem) of object;

property OnItemEnter: TLVItemEnterEvent;

Description

Use OnItemEnter to respond to mouse motion over items. This event occurs when the mouse enters the rectanble used by Item.


TCustomListView.OnItemExitViewportEnter
 CLX Reference

TCustomListView.OnItemExitViewportEnter

TCustomListView

Occurs when the mouse pointer moves from an item to empty viewport area.

TLVItemExitViewportEnterEvent= procedure(Sender: TObject; Item: TListItem) of object;

property OnItemExitViewportEnter: TLVItemExitViewportEnterEvent

Description

Use OnItemExitViewportEnter to respond when the user moves the mouse pointer from an item to empy viewport space not occupied by any item. The Item parameter indicates which item the pointer moved away from


TCustomListView.OnItemMouseDown
 CLX Reference

TCustomListView.OnItemMouseDown

TCustomListView

Occurs when the user presses a mouse button with the mouse pointer over a List View item.

TLVButtonDownEvent = procedure(Sender: TObject; Button: TMouseButton; Item: TListItem; Pt: TPoint; ColIndex: Integer) of object;

property OnItemMouseDown: TLVButtonDownEvent;

Description

Use the OnItemMouseDown to respond when the user presses a mouse button with the mouse pointer over an item. The Item parameter indicates which item the pointer is over. The Pt parameter indicates the pointer's location in the List View viewport. ColIndex indicates which column the pointer is over.


 CLX 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.


TCustomListView.OnViewportMouseDown
 CLX Reference

 KTCustomListView.OnViewportMouseDown

TCustomListView	See Also

Occurs when the mouse is pressed over empty viewport.

TLVViewportButtonDownEvent = procedure(Sender: TObject; Button: TMouseButton; Pt: TPoint) of object;

property OnViewPortMouseDown: TLVViewportButtonDownEvent;

Description

Use OnViewPortMouseDown to respond to a mouse press when the pointer is over the empy viewport space not occupied by any item


 CLX Reference

TCustomListView Methods

TCustomListView	Alphabetically	Legend

In TCustomListView

AlphaSort

Create

Destroy

DoDrawItem

DoEdited

DoEditing

DoGetImageIndex

FindCaption

FindData

GetItemAt

GetNearestItem

GetNextItem

HookEvents

ImageListChanged

Init

InitWidget

IsOwnerDrawn

ItemChange

ItemChanging

ItemChecked

ItemDestroyed

ItemSelected

RestoreWidgetState

SaveWidgetState

Scroll

UpdateItems

Derived from TCustomViewControl

InvertSelection

IsEditing

Sort

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomListView Methods

TCustomListView	By Object	Legend

AfterConstruction

AlphaSort

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DoDrawItem

DoEdited

DoEditing

DoGetImageIndex

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindCaption

FindChildControl

FindComponent

FindData

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItemAt

GetNamePath

GetNearestItem

GetNextItem

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

HookEvents

ImageListChanged

InheritsFrom

Init

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvertSelection

InvokeHelp

IsEditing

IsImplementorOf

IsOwnerDrawn

ItemChange

ItemChanging

ItemChecked

ItemDestroyed

ItemSelected

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

RestoreWidgetState

SafeCallException

SaveWidgetState

ScaleBy

ScreenToClient

Scroll

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Sort

Update

UpdateAction

UpdateControlState

UpdateItems


TCustomListView.AlphaSort
 CLX Reference

TCustomListView.AlphaSort

TCustomListView	See also

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.Create
 CLX 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.Destroy
 CLX 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.DoDrawItem
 CLX Reference

TCustomListView.DoDrawItem

TCustomListView	See also

Draw on owner-drawn list.

procedure DoDrawItem(Item: TCustomViewItem; Canvas: TCanvas; const Rect: TRect; State: TOwnerDrawState); override;

Description

DoDrawItem is called automatically when the list is owner-drawn and item needs to be drawn. As implemented in TCustomListView, DoDrawItem calls the OnDrawItem event handler.


TCustomListView.DoEdited
 CLX Reference

TCustomListView.DoEdited

TCustomListView	See also

Respond to item editing completion.

procedure DoEdited(AItem: TCustomViewItem; var S: WideString); override;

Description

DoEdited is called automatically when editing of an item has been completed and accepted. As implemented in TCustomListView, DoEdited passes its parameters to the OnEdited event handler, if defined.


TCustomListView.DoEditing
 CLX Reference

TCustomListView.DoEditing

TCustomListView	See also

Respond to item editing.

procedure DoEditing(AItem: TCustomViewItem; var AllowEdit: Boolean); override;

Description

DoEditing is called automatically when a user attempts to edit an item. AItem is the item being edited. AllowEdit is set to true; if DoEditing changes AllowEdit to false, editing is canceled.

As implemented in TCustomListView, DoEditing passes its parameters to the OnEditing event handler, if defined.


TCustomListView.DoGetImageIndex
 CLX Reference

TCustomListView.DoGetImageIndex

TCustomListView	See also

Implement image index events.

procedure DoGetImageIndex(item: TCustomViewItem); override;

Description

TCustomListView overrides DoGetImageIndex in order to call the OnGetImageIndex event handler, if defined.


TCustomListView.FindCaption
 CLX 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
 CLX 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.GetItemAt
 CLX 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.GetNearestItem
 CLX 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
 CLX 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.HookEvents
 CLX Reference

TCustomListView.HookEvents

TCustomListView

Registers callbacks for handling system event events and widget signals.

procedure HookEvents; override;

Description

HookEvents is called automatically when the underlying widget is created. It registers the callbacks that allow a control to respond to events detected by the widget.

In TCustomListView, HookEvents first calls the inherited method. It then associates Qt mouse click events with an internal routine that implements item selection and support for the OnItemClick event.

Note:	When overriding the HookEvents method, be sure to call the inherited method so that ancestor classes register their own callbacks. For more information about overriding HookEvents, see TWidgetControl.HookEvents.


TCustomListView.ImageListChanged
 CLX Reference

TCustomListView.ImageListChanged

TCustomListView

Respond to change in image list.

procedure ImageListChanged; override;

Description

ImageListChanged is called automatically when the control's image list has changed. As implemented in TCustomListView, ImageListChanged updates the image for each item.


TCustomListView.Init
 CLX Reference

TCustomListView.Init

TCustomListView

Initialize underlying Qt object.

procedure Init(AListItemClass: TListItemClass); virtual;

Description

Init sets the initial state of a TCustomListView object. A descendent class can override Init to modify this setting.


TCustomListView.InitWidget
 CLX Reference

TCustomListView.InitWidget

TCustomListView

Initialize underlying Qt object.

procedure InitWidget; override;

Description

CreateWidget sets the initial properties of the underlying QListView object. CreateWidget is called automatically after InitWidget and prior to the initial display of the List View.

Override CreateWidget to modify the initial properties of the underlying QListView object. Be sure to call the inherited method.


TCustomListView.IsOwnerDrawn
 CLX Reference

TCustomListView.IsOwnerDrawn

TCustomListView	See also

Determined if control is considered owner-drawn.

function IsOwnerDrawn: Boolean; override;

Description

In TCustomListView, IsOwnerDrawn returns True if the following conditions are all true:

The OwnerDraw property is True.

The ViewStyle property is vsReport.

The OnDrawItem event handler is defined.


TCustomListView.ItemChange
 CLX Reference

TCustomListView.ItemChange

TCustomListView

Respond to item change.

procedure ItemChange(item: QListViewItemH; _type: TItemChange); override;

Description

ItemChange is called automatically when a list item change has been completed and accepted. As implemented in TCustomListView, ItemChange calls the OnChange event handler, if defined.


TCustomListView.ItemChanging
 CLX Reference

TCustomListView.ItemChanging

TCustomListView

Filter item change.

procedure ItemChanging(item: QListViewItemH; _type: TItemChange; var Allow: Boolean); override;

Description

ItemChanging is called automatically when a list item is about to change. If ItemChanging sets Allow to False, the change is prevented. As implemented in TCustomListView, ItemChanging calls the OnChanging event handler, if defined.


TCustomListView.ItemChecked
 CLX Reference

TCustomListView.ItemChecked

TCustomListView

Respond to Qt widget checked state change.

procedure ItemChecked(item: QListViewItemH; Checked: Boolean); override;

Description

ItemChecked is called automatically when a list item on the underlying Qt widget is checked or unchecked. As implemented in TCustomListView, ItemChecked updates the Checked property of the corresponding TListItem object to match this state, as passed in the Checked parameter.


TCustomListView.ItemDestroyed
 CLX Reference

TCustomListView.ItemDestroyed

TCustomListView

Respond to Qt widget item destruction.

procedure ItemDestroyed(AItem: QListViewItemH); override;

Description

ItemDestroyed is called automatically when a list item on the underlying Qt widget is destroyed. As implemented in TCustomListView, ItemDestroyed removes the association between the widget list item and its corresponding TListItem object. The TListItem is then freed, provided the list view is in its normal run time state.


TCustomListView.ItemSelected
 CLX Reference

TCustomListView.ItemSelected

TCustomListView

Respond to Qt widget item selected.

procedure ItemSelected(item: QListViewItemH; wasSelected: Boolean); override;

Description

ItemSelected is called automatically when a list item on the underlying Qt widget is selected (wasSelected is true) or deselected (wasSelected is false). As implemented in TCustomListView, ItemSelected updates the SelCount property and updates the OnSelectItem event handler, if defined.


TCustomListView.RestoreWidgetState
 CLX Reference

TCustomListView.RestoreWidgetState

TCustomListView

Restores state information to the underlying Qt widget.

procedure RestoreWidgetState; override;

Description

RestoreWidgetState is called automatically when the underlying Qt widget is created or re-created, in order to configure the underlying Qt widget. For more information, see TWidgetControl.RestoreWidgetState.

As implemented in TCustomListView, RestoreWidgetState restores data relating to item state.


TCustomListView.SaveWidgetState
 CLX Reference

TCustomListView.SaveWidgetState

TCustomListView

Save state information from underlying Qt widget.

procedure SaveWidgetState; virtual;

Description

SaveWidgetState is called automatically when the underlying Qt widget is destroyed prior to being re-created. For more information, see TWidgetControl.SaveWidgetState.

As implemented in TCustomListView, SaveWidgetState saves data relating to item state.


TCustomListView.Scroll
 CLX 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.UpdateItems
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomViewControl

{bmc vertdash.bmp

TFrameControl

TCustomListView


TCustomMaskEdit
 CLX 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

QMask

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.


 CLX Reference

TCustomMaskEdit Properties

TCustomMaskEdit	Alphabetically	Legend

In TCustomMaskEdit

BeepOnError

EditMask

EditText

IsMasked

MaskState

MaxLength

SelText

Text

Derived from TCustomEdit

Handle

Modified

SelLength

SelStart

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomMaskEdit Properties

TCustomMaskEdit	By Object	Legend

Action

Align

Anchors

BeepOnError

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

EditMask

EditText

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

IsMasked

Left

MaskState

MaxLength

Modified

Name

Owner

Parent

ParentWidget

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

Text

Top

Visible

Width


TCustomMaskEdit.BeepOnError
 CLX Reference

TCustomMaskEdit.BeepOnError

TCustomMaskEdit	See also

Specifies whether the edit control beeps when the user tries to enter text that does not match the mask.

property BeepOnError: Boolean;

Description

If BeepOnError is True (the default), the application beeps when a validation error occurs.


TCustomMaskEdit.EditMask
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.SelText
 CLX Reference

TCustomMaskEdit.SelText

TCustomMaskEdit	See also

Specifies the selected portion of the control's text.

property SelText: WideString;

Description

Use SelText to get or set the selected text in the edit control. SelText includes any mask characters in the selection.


TCustomMaskEdit.Text
 CLX 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.


 CLX Reference

TCustomMaskEdit Methods

TCustomMaskEdit	Alphabetically	Legend

In TCustomMaskEdit

CheckCursor

Clear

Create

CutToClipboard

DoEnter

DoExit

EditCanModify

GetFirstEditChar

GetLastEditChar

GetMaxChars

GetNextEditChar

GetPriorEditChar

GetSel

GetTextLen

KeyDown

KeyPress

KeyString

KeyUp

MouseDown

MouseUp

PasteFromClipboard

ReformatText

Reset

SetCursor

SetSel

SetSelText

SetText

TextChanged

Validate

ValidateEdit

ValidateError

Derived from TCustomEdit

ClearSelection

CopyToClipboard

GetSelTextBuf

SelectAll

SetSelTextBuf

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomMaskEdit Methods

TCustomMaskEdit	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

CheckCursor

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DoEnter

DoExit

DragDrop

Dragging

EditCanModify

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetFirstEditChar

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLastEditChar

GetMaxChars

GetNamePath

GetNextEditChar

GetParentComponent

GetPriorEditChar

GetSel

GetSelTextBuf

GetTabOrderList

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

KeyDown

KeyPress

KeyString

KeyUp

MethodAddress

MethodName

MouseDown

MouseUp

NewInstance

ParentToClient

PasteFromClipboard

Realign

ReferenceInterface

ReformatText

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

Reset

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetCursor

SetFocus

SetSel

SetSelText

SetSelTextBuf

SetSubComponent

SetText

Show

TextChanged

Update

UpdateAction

UpdateControlState

Validate

ValidateEdit

ValidateError


TCustomMaskEdit.CheckCursor
 CLX 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
 CLX 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
 CLX 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.CutToClipboard
 CLX Reference

TCustomMaskEdit.CutToClipboard

TCustomMaskEdit

Copies the selected text to the Clipboard and deletes the selection.

procedure CutToClipboard; override;

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.

TCustomMaskEdit re-implements CutToClipBoard to support mask handling.


TCustomMaskEdit.DoEnter
 CLX Reference

TCustomMaskEdit.DoEnter

TCustomMaskEdit	See also

Responds when the edit control receives input focus.

procedure DoEnter; override;

Description

DoEnter is called automatically when the edit control receives input focus. If the edit control has a mask, DoEnter ensures that the mask is properly handled. If there is no mask, DoEnter calls the inherited method, which generates an OnEnter event.


TCustomMaskEdit.DoExit
 CLX Reference

TCustomMaskEdit.DoExit

TCustomMaskEdit	See also

Responds when the edit control loses input focus.

procedure DoExit; override;

Description

DoExit validates the text currently in the masked edit control before releasing focus. It then calls the inherited method, which generates an OnExit event.


TCustomMaskEdit.EditCanModify
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.KeyString
 CLX Reference

TCustomMaskEdit.KeyString

TCustomMaskEdit	See also

Responds when the user enters a character when using a multi-byte character set.

procedure KeyString(var S: WideString; var Handled: Boolean); override;

Description

KeyString generates an OnKeyString event, and then applies the mask to the newly entered character.

S is the multi-byte character that was just entered.

Handled returns True if the edit control handled the character specified by S, False if it still needs to be handled.


TCustomMaskEdit.KeyUp
 CLX 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.MouseDown
 CLX Reference

TCustomMaskEdit.MouseDown

TCustomMaskEdit	See also

Generates an OnMouseDown event.

procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

This method is called automatically when the user clicks a mouse button on the masked edit control.

Button indicates which mouse button the user pressed.

Shift indicates the concurrent state of the Shift, Ctrl, and Alt keys.

X and Y are the pixel coordinates of the mouse pointer within the client area of the edit control.


TCustomMaskEdit.MouseUp
 CLX Reference

TCustomMaskEdit.MouseUp

TCustomMaskEdit	See also

Generates an OnMouseUp event.

procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

MouseUp generates an OnMouseUp event. Then, if the edit control has a mask, it ensures that the cursor is properly positioned.

Button indicates which mouse button the user released.

Shift indicates the concurrent state of the Shift, Ctrl, and Alt keys.

X and Y are the pixel coordinates of the mouse pointer within the client area of the edit control.


TCustomMaskEdit.PasteFromClipboard
 CLX Reference

TCustomMaskEdit.PasteFromClipboard

TCustomMaskEdit

Pastes the contents of the Clipboard into edit control, replacing the current selection.

procedure PasteFromClipboard; override;

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, PasteFromClipboard does nothing.


TCustomMaskEdit.ReformatText
 CLX 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
 CLX 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
 CLX 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
 CLX 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.SetSelText
 CLX Reference

TCustomMaskEdit.SetSelText

TCustomMaskEdit	See also

Sets the SelText property.

procedure SetSelText(const Value: WideString); override;

Description

SetSelText is the write implementation of the SelText property. It overrides the inherited method to handle the mask properly.


TCustomMaskEdit.SetText
 CLX Reference

TCustomMaskEdit.SetText

TCustomMaskEdit

Sets the Text property.

procedure SetText(const Value: TCaption; override;

Description

SetText is the write implementation for the Text property. It is re-implemented in TCustomMaskEdit to support mask handling.


TCustomMaskEdit.TextChanged
 CLX Reference

TCustomMaskEdit.TextChanged

TCustomMaskEdit	See also

Notify control that text or caption has changed.

procedure TextChanged; override;

Description

TextChanged is called automatically when the Text property changes. It is re-implemented in TCustomMaskEdit to support mask handling.


TCustomMaskEdit.Validate
 CLX 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
 CLX 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
 CLX 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

TWidgetControl

TCustomEdit

TCustomMaskEdit


TCustomMemo
 CLX 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

QStdCtrls

Description

TCustomMemo introduces properties and methods 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.

QMultiLineEdit is the underlying widget for TCustomMemo. It is a simple editor for inputting text. The QMultiLineEdit widget provides multiple line text input and display. It is intended for moderate amounts of text.


 CLX Reference

TCustomMemo properties

TCustomMemo	Alphabetically	Legend

In TCustomMemo

Alignment

CaretPos

Handle

HMargin

Lines

MaxLength

Modified

ReadOnly

ScrollBars

Selection

SelLength

SelStart

SelText

Text

TextWidth

WantReturns

WantTabs

WordWrap

WrapAtValue

WrapBreak

WrapMode

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomMemo Properties

TCustomMemo	By Object	Legend

Action

Align

Alignment

Anchors

BoundsRect

Brush

CaretPos

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HMargin

Left

Lines

MaxLength

Modified

Name

Owner

Parent

ParentColor

ParentWidget

ReadOnly

ScrollBars

Selection

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

Text

TextWidth

Top

Visible

WantReturns

WantTabs

Width

WordWrap

WrapAtValue

WrapBreak

WrapMode


TCustomMemo.Alignment
 CLX 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
 CLX Reference

TCustomMemo.CaretPos

TCustomMemo	See also

Indicates the position of the caret in the client area of the memo.

property CaretPos: TCaretPos;

Description

Use CaretPos to determine the coordinates of the cursor. The TCaretPos type locates the cursor position by its line and column (character). Thus, CaretPos.Line is the current line, and CaretPos.Col is the character within that line.

To determine the position of the caret in terms of characters of text only (rather than by line and column), use the SelStart property.


TCustomMemo.Handle
 CLX Reference

TCustomMemo.Handle

TCustomMemo

Returns a unique 4-byte identifier that represents the instance of the underlying Qt QOpenMultiLineEdit widget.

property Handle: QOpenMultiLineEditH;

Description

Use Handle to return a typed pointer to the instance of the underlying QOpenMultiLineEdit object. This Handle can be used when making low-level function calls into the QT shared libraries, where the function call requires an instance pointer to a QOpenMultiLineEdit object.


TCustomMemo.HMargin
 CLX Reference

TCustomMemo.HMargin

TCustomMemo

Specifies the horizontal margins, in pixels, used in the client area of the TMemo.

property HMargin: Integer;

Description

Use HMargin to read or set the the horizontal margins, in pixels, used in the client area to contain the text of the TMemo. The default is 3.


TCustomMemo.Lines
 CLX Reference

TCustomMemo.Lines

TCustomMemo	See also

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.

Warning:	Unlike most TStrings objects, the Lines property stores its lines in a 1-based array, not a zero-based array.


TCustomMemo.MaxLength
 CLX Reference

TCustomMemo.MaxLength

TCustomMemo

Specifies the maximum length of text, in characters that the memo can contain.

property MaxLength: ;

Description

Use MaxLength to read or set the maximum number of characters that the memo can contain.

Note:	If you set MaxLength to a value less than the number of characters already in the memo’s text, MaxLength has no effect until the text sinks below MaxLength characters. That is, setting MaxLength prevents the text from changing from a length less than MaxLength to a length greater than MaxLength.


TCustomMemo.Modified
 CLX Reference

TCustomMemo.Modified

TCustomMemo	See also

Specifies whether the contents of a line has changed.

property Modified: Boolean;

Description

Read Modified to determine whether the contents of the current line in the memo have changed. If Modified is False, the current line has not changed since it became the current line. If Modified is True, the current line has been edited.


TCustomMemo.ReadOnly
 CLX Reference

TCustomMemo.ReadOnly

TCustomMemo	See also

Determines whether the user can change the text of the memo control.

property ReadOnly: Boolean;

Description

To restrict the memo control to a read-only display, set the ReadOnly property to True. Set ReadOnly to False to allow the contents of the memo 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.


TCustomMemo.ScrollBars
 CLX Reference

TCustomMemo.ScrollBars

TCustomMemo	See also

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.Selection
 CLX Reference

TCustomMemo.::Selection

TCustomMemo	See also

Returns the boundaries of the selected text.

type

  TMemoSelection = record

    caseInteger!ALink(integer_type,1,TopicNotFound,main) of

      0: (Line1, Col1, Line2, Col2: Integer!ALink(integer_type,1,TopicNotFound,main));

      1: (TopLeft, BottomRight: TCaretPos);

end;

property Selection: TMemoSelection;

Description

Read Selection to determine the boundaries of the selected text, if any. The value of Selection is a record of type TMemoSelection. If there is marked text, this record represents the lines and columns of the memo that border the selected text.


TCustomMemo.SelLength
 CLX Reference

TCustomMemo.SelLength

TCustomMemo	See also

Specifies the number of characters that are selected.

property SelLength: Integer;

Description

Read SelLength to determine the length, in characters, of the selected text. Set SelLength to change the selection to consist of the first SelLength characters starting at SelStart. If SelLength is less than zero, the selection covers the specified number of characters to the left of 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.

Note:	The memo gives a visual indication of the selection only when it has focus.


TCustomMemo.SelStart
 CLX Reference

TCustomMemo.SelStart

TCustomMemo	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, the second with 1, and so on. If there is no selected text (SelLength=0), SelStart indicates the position of the cursor.

Set SelStart to position the cursor in the edit region of the memo control.

To select a particular range of the text, first set SelStart to position the cursor, and then set SelLength to extend the selection. Set SelStart to remove the current selection and position the cursor just before the indicated character.

Note:	The memo gives a visual indication of the selection only when it has focus.


TCustomMemo.SelText
 CLX Reference

TCustomMemo.SelText

TCustomMemo	See also

Specifies the selected portion of the memo 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 memo control has focus, set SelText to insert a new string into the text at the cursor.


TCustomMemo.Text
 CLX Reference

TCustomMemo.Text

TCustomMemo	See also

Specifies the entire text that is displayed in the memo field.

property Text: TCaption;

Description

Use the Text property to read the entire text of the memo field or specify a new string for the Text value. When the memo control is first created, Text is the string specified in the Name property.


TCustomMemo.TextWidth
 CLX Reference

TCustomMemo.TextWidth

TCustomMemo	See also

Returns the width, in pixels, of a given line.

property TextWidth[LineNum: Integer]: Integer;

Description

Use TextWidth to return the width, in pixels, of the line specified by the LineNum parameter.


TCustomMemo.WantReturns
 CLX 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
 CLX 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
 CLX 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.


TCustomMemo.WrapAtValue
 CLX Reference

TCustomMemo.WrapAtValue

TCustomMemo	See also

Specifies the wrap column or wrap width, depending on the WrapMode property.

property WrapAtValue: Integer;

Description

Use WrapAtValue to specify the column or number of pixels where wrapping occurs, depending on the value of WrapMode. If WrapMode is set to wmPixel, the wrapping occurs after the number of pixels specified by this property. If WrapMode is set to wmColumn, the wrapping occurs after the number of columns specified. For all other wrap modes, this property has no effect.

Note:	WrapAtValue has no effect if WordWrap is False.


TCustomMemo.WrapBreak
 CLX Reference

TCustomMemo.WrapBreak

TCustomMemo	See also

Specifies where text can be wrapped when WordWrap is True.

type TWrapBreak = (wbWhitespace, wbAnywhere);

property WrapBreak: TWrapBreak;

Description

Use WrapBreak to indicate at what point the memo can separate text into lines when the WordWrap property is True. WrapBreak can be set to one of the following values:

Value	Meaning

wbWhitespace	Wrapping occurs only after whitespace.

wbAnywhere	Wrapping occurs anywhere.


TCustomMemo.WrapMode
 CLX Reference

TCustomMemo.WrapMode

TCustomMemoSee also

Specifies where the memo control tries to wrap text when WordWrap is True.

type TWrapMode = (wmNone, wmWidth, wmPixel, wmColumn);

property WrapMode: TWrapMode;

Description

Use WrapMode to specify the point at which the memo wraps text when WordWrap is True. WrapMode has no effect if WordWrap is False.

WrapMode can be set to one of the following values:

Value	Meaning

wmNone	Word wrap does not occur at all, even if WordWrap is set to True.

wmWidth	The memo wraps text based on the current width of the memo control.

wmPixel	The memo wraps text according to the number of pixels specified by the WrapAtValue property.

wmColumn	Word wrap according to the number of columns specified by the WrapAtValue property.

Tip:	 Set WrapMode to wmColumn whenever you need formatted text that can also be displayed gracefully on devices with monospaced fonts, for example a standard VT100 terminal. In that case the WrapValue property is typically set to 80.


 CLX Reference

TCustomMemo events

TCustomMemo	Alphabetically	Legend

In TCustomMemo

OnChange

OnReturnPressed


 CLX Reference

TCustomMemo events

TCustomMemo	By object	Legend

In TCustomMemo

OnChange

OnReturnPressed


TCustomMemo.OnChange
 CLX Reference

TCustomMemo.OnChange

TCustomMemol	See also

Occurs when the text for the memo control may have changed.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to take specific action whenever the text for the memo control may have changed. Use the Modified property to see if a change actually occurred. The Text property of the memo 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 memo control.


TCustomMemo.OnReturnPressed
 CLX Reference

TCustomMemo.OnReturnPressed

TCustomMemol	See also

Occurs when the user presses the return or enter key.

property OnReturnPressed: TNotifyEvent;

Description

Write an OnReturnPressed event handler to take specific action whenever the user presses the return or enter key while the memo control has focus. If the ReadOnly property is set to True, an OnReturnPressed event is not generated. In order for the OnReturnPressed event to be generated, ReadOnly must be set to False.


 CLX Reference

TCustomMemo methods

TCustomMemo	Alphabetically	Legend

In TCustomMemo

Append

AtEOF

Change

Clear

ClearSelection

CopyToClipboard

Create

CreateWidget

CutToClipboard

Destroy

FontChanged

GetSelLength

GetSelStart

GetSelText

GetText

GetTextBuf

GetTextLen

HasSelection

HookEvents

InitWidget

Insert

LineLength

Loaded

NeedKey

PasteFromClipboard

ReturnPressed

SelectAll

SetAlignment

SetCaretPos

SetHMargin

SetLines

SetMaxLength

SetModified

SetReadOnly

SetScrollBars

SetSelLength

SetSelStart

SetSelText

SetText

SetWordWrap

SetWrapBreak

SetWrapMode

SetWrapValue

UnSelect

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomMemo Methods

TCustomMemo	By Object	Legend

AfterConstruction

Append

Assign

AtEOF

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CreateWidget

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

FontChanged

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelLength

GetSelStart

GetSelText

GetTabOrderList

GetText

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

HasSelection

Hide

HookEvents

InheritsFrom

InitiateAction

InitInstance

InitWidget

Insert

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

LineLength

Loaded

MethodAddress

MethodName

NeedKey

NewInstance

ParentToClient

PasteFromClipboard

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReturnPressed

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetAlignment

SetBounds

SetCaretPos

SetFocus

SetHMargin

SetLines

SetMaxLength

SetModified

SetReadOnly

SetScrollBars

SetSelLength

SetSelStart

SetSelText

SetSubComponent

SetText

SetWordWrap

SetWrapBreak

SetWrapMode

SetWrapValue

Show

UnSelect

Update

UpdateAction

UpdateControlState


TCustomMemo.Append
 CLX Reference

TCustomMemo.Append

TCustomMemo	See also

Appends a string to the end of the memo’s text.

procedure Append(const Text: WideString);

Description

Use Append to add the string, specified by the Text parameter, to the end of the existing text in the memo control.


TCustomMemo.AtEOF
 CLX Reference

TCustomMemo.AtEOF

TCustomMemo

Tests whether the cursor is currently positioned at the end of the memo’s text.

function AtEOF: Boolean;

Description

Use AtEOF to test whether the current cursor position is at the of the text contained in the memo control. AtEOF returns True if the current cursor position is beyond the last character of the text, otherwise, AtEOF returns False.


TCustomMemo.::Change
 CLX Reference

TCustomMemo.Change

TCustomEdit	See also

Generates an OnChange event.

procedure Change; virtual;

Description

Applications do not call the Change method directly. It is called automatically when the memo’s text changes. 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.


TCustomMemo.Clear
 CLX Reference

TCustomMemo.Clear

TCustomMemo	See also

Deletes all text from the memo 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.


TCustomMemo.ClearSelection
 CLX Reference

TCustomMemo.ClearSelection

TCustomMemo	See also

Deletes 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.


TCustomMemo.CopyToClipboard
 CLX Reference

TCustomMemo.CopyToClipboard

TCustomMemo	See also

Copies the selected text in the memo control to the Clipboard.

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.


TCustomMemo.Create
 CLX 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.CreateWidget
 CLX Reference

TCustomMemo.CreateWidget

TCustomMemo	See also

Creates the underlying Qt QMultiLineEdit widget.

procedure CreateWidget; override;

Description

CreateWidget is called when the memo control needs to instantiate the underlying Qt QMultiLineEdit widget. After creating the widget, CreateWidget installs the Qt event Hook object that is associated with the widget.

CreateWidget should never need to be overridden in descendents of the TCustomMemo class. The inherited method should never be called when this method is overridden.


TCustomMemo.CutToClipboard
 CLX Reference

TCustomMemo.CutToClipboard

TCustomMemo	See also

Copies the selected text to the Clipboard in clear text format and then deletes the selection.

procedure CutToClipboard;

Description

Use CutToClipboard to replace the contents of the Clipboard with the selected. After copying the selected text, CutToClipboard deletes the selected text. If no text is selected, CutToClipboard does nothing.


TCustomMemo.Destroy
 CLX 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.FontChanged
 CLX Reference

TCustomMemo.FontChanged

TCustomMemo	See also

Ensures that the memo reflects the new value when the Font property changes.

procedure FontChanged; override;

Description

Applications cannot call this protected method. It is called automatically when the Font property changes.

FontChanged propagates the new font value to underlying widget and forces a repaint so that the new font is displayed.


TCustomMemo.GetSelLength
 CLX Reference

TCustomMemo.GetSelLength

TCustomMemo	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 TCustomMemo can customize the implementation of the SelLength property.

GetSelLength returns the difference between the starting position and the ending position.


TCustomMemo.GetSelStart
 CLX Reference

TCustomMemo.GetSelStart

TCustomMemo	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 TCustomMemo can customize the implementation of the SelStart property.


TCustomMemo.GetSelText
 CLX Reference

TCustomMemo.GetSelText

TCustomMemo	See also

Returns the SelText property.

function GetSelText: WideString; virtual;

Description

GetSelText is the property access method for the SelText property. It is exposed as a protected method so that descendants of TCustomMemo can customize the implementation of the SelText property.


TCustomMemo.GetText
 CLX Reference

TCustomMemo.GetText

TCustomMemo	See also

Returns the Text property.

function GetText: TCaption; virtual;

Description

GetText is the property access method for the Text property. It is exposed as a protected method so that descendants of TCustomMemo can customize the implementation of the Text property.


TCustomMemo.GetTextBuf
 CLX Reference

TCustomMemo.GetTextBuf

TCustomMemo	See also

Retrieves the memo'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 the memo 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.

Note:	GetTextBuf is available for compatibility and causes unnecessary copying. Where backward compatibility is not an issue, use the Text property.


TCustomMemo.GetTextLen
 CLX Reference

TCustomMemo.GetTextLen

TCustomMemo	See also

Returns the number of characters in the memo's text.

function GetTextLen: Integer;

Description

Call GetTextLen to find the length of the memo’s text. This is the size needed for a text buffer to be used by the GetTextBuf method..


TCustomMemo.HasSelection
 CLX Reference

TCustomMemo.HasSelection

TCustomMemo	See also

Indicates whether there is any currently selected text.

function HasSelection: Boolean;

Description

Use HasSelection to determine whether there is any currently selected text in the memo. HasSelection returns True if there is currently selected text, otherwise HasSelection returns False if no text is selected.


TCustomMemo.HookEvents
 CLX Reference

TCustomMemo.:HookEvents

TCustomMemo	See also

Registers callbacks for handling system event events and widget signals.

procedure HookEvents; override;

Description

HookEvents is called automatically when the underlying widget is created. It registers the callbacks that allow a control to respond to events detected by the widget.

In TCustomRadioGroup, HookEvents registers callbacks that generate the OnChange and OnReturnPressed events when the underlying widget detects changes to the memo’s text or that the user pressed the Enter key.

Note:	When overriding the HookEvents method, be sure to call the inherited method so that ancestor classes register their own callbacks. For more information about overriding HookEvents, see TWidgetControl.HookEvents.


TCustomMemo.InitWidget
 CLX Reference

TCustomMemo.InitWidget

TCustomMemo	See also

Initializes the underlying Qt QMultiLineLineEdit widget before it is displayed after it has been created.

procedure InitWidget; override;

Description

InitWidget is called internally after the CreateWidget method is called. InitWidget initializes the underlying Qt widget prior to the widget being displayed after it has been created.

Override InitWidget to specify how the widget is to be displayed after it has been created. When overriding InitWidget the inherited method should be called.


TCustomMemo.Insert
 CLX Reference

TCustomMemo.Insert

TCustomMemo	See also

Inserts a string into the memo control's text.

procedure Insert(const Text: WideString; Mark: Boolean = False); overload;

procedure Insert(const Text: WideString; Column, Row: Integer; Mark: Boolean = False); overload;

Description

Use Insert to insert a string into the memo control's text.

Text is the string to insert into the memo’s text.

Mark specifies whether Text should be selected after it is inserted. If Mark True, the string that is inserted is automatically selected. If Mark is False, the string is not selected.

Column and Row specify the location, by row and column, where Text should be inserted. If these parameters are not supplied, Text is added at the cursor position (CaretPos).

After the string is inserted, the caret position is automatically adjusted. If the insertion position is equal to the caret position, the cursor is placed after the end of the new text. If the string contains any newline characters, new lines are inserted.

Note:	To insert text at the end of the memo's text, use the Append method.


TCustomMemo.LineLength
 CLX Reference

TCustomMemo.LineLength

TCustomMemo	See also

Returns the length, in characters, of a specified line of text.

function LineLength(Index: Integer): Integer;

Description

Use LineLength to return the number of characters contained by the line specified by the Index parameter.


TCustomMemo.Loaded
 CLX 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.NeedKey
 CLX Reference

TCustomMemo.NeedKey

TCustomMemo	See also

Ensures that the memo responds to the Tab key as specified by the WantTabs property.

function NeedKey(Key: Integer; Shift: TShiftState; KeyText: WideString): Boolean; override;

Description

When the user presses a key while the memo has focus, NeedKey is automatically called. This method is intended only for handling keystrokes when another control (including the form or any menus) can’t be allowed to respond first. Any keystrokes not handled by NeedKey are handled by the WantKey method. TCustomMemo overrides NeedKey to ensure that it captures the Tab key before the form when WantTabs is True.

Key is the integer representation of the key that the user pressed. This can be the ordinal value of the character, or a symbolic key code.

Shift indicates whether the Shift, Alt, and/or Control keys were simultaneously pressed.

KeyText is the character value of the key that was pressed.

NeedKey returns True if the method handled the keystroke, False otherwise.


TCustomMemo.PasteFromClipboard
 CLX Reference

TCustomMemo.PasteFromClipboard

TCustomMemo	See also

Pastes the contents of the Clipboard into the memo, 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 clear text format, PasteFromClipboard does nothing.


TCustomMemo.ReturnPressed
 CLX Reference

TCustomMemo.ReturnPressed

TCustomMemo	See also

Generates an OnReturnPressed event.

procedure ReturnPressed; virtual;

Description

ReturnPressed is the protected implementation method for the On ReturnPressed event. Override this method to add additional processing when the ruturn key is pressed, or to block the On ReturnPressed event.


TCustomMemo.SelectAll
 CLX Reference

TCustomMemo.SelectAll

TCustomMemo	See also

Selects all text in the memo.

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.


TCustomMemo.::SetAlignment
 CLX 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
 CLX Reference

TCustomMemo.SetCaretPos

TCustomMemo	See also

Sets the CaretPos property.

procedure SetCaretPos (const Value: TCaretPos);

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.SetHMargin
 CLX Reference

TCustomMemo.SetHMargin

TCustomMemo	See also

Sets the horizontal margin.

procedure SetHMargin (const Value: Integer);

Description

SetHMargin is the protected write implementaiton of the HMargin property.


TCustomMemo.SetLines
 CLX 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.SetMaxLength
 CLX Reference

TCustomMemo.SetMaxLength

TCustomMemo	See also

Sets the maximum number characters that can appear in a line.

procedure SetMaxLength(const Value: Integer);

Description

SetMaxLength is the protected write implementation of the MaxLength property.


TCustomMemo.SetModified
 CLX Reference

TCustomMemo.SetModified

TCustomMemo	See also

Sets the value of the Modified property.

procedure SetModified(const Value: Boolean); virtual;

Description

SetModified is the protected write access method for the Modified property.

SetModified sets the edited flag of the current line in the memo control to the value specified by Value. Note that even if Value is False, this value will change to True as soon as the user starts editing the line.


TCustomMemo.SetReadOnly
 CLX Reference

TCustomMemo.SetReadOnly

TCustomMemo	See also

Sets memo control to read-only display.

procedure SetReadOnly(const Value: Boolean); virtual;

Description

SetReadOnly is the write access method to the ReadOnly property. To restrict the memo control to a read-only display, set the ReadOnly property to True. Set ReadOnly to False to allow the contents of the memo control to be edited.

Value is the new value of the ReadOnly property.


TCustomMemo.::SetScrollBars
 CLX 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.SetSelLength
 CLX Reference

TCustomMemo.SetSelLength

TCustomMemo	See also

Sets the SelLength property.

procedure SetSelLength(const Value: Integer); virtual;

Description

SetSelLength is the property access method for the SelLength property.

Value is the new length, in characters, of the selected text in the memo.


TCustomMemo.SetSelStart
 CLX Reference

TCustomMemo.SetSelStart

TCustomMemo	See also

Sets the SelStart property.

procedure SetSelStart(const Value: Integer); virtual;

Description

SetSelStart is the property access method for the SelStart property.

Value is the position, in characters, of the first selected character in the memo’s text.


TCustomMemo.SetSelText
 CLX Reference

TCustomMemo.SetSelText

TCustomMemo	See also

Sets the SelText property.

procedure SetSelText(const Value: WideString); virtual;

Description

SetSelText is the property access method for the SelText property. It is exposed as a protected method so that descendants of TCustomMemo can customize the implementation of the SelText property.


TCustomMemo.SetText
 CLX Reference

TCustomMemo.SetText

TCustomMemo	See also

Sets the Text property.

procedure SetText(const Value: TCaption); override;

Description

SetText is the property access method for the Text property. It is exposed as a protected method so that descendants of TCustomMemo can customize the implementation of the Text property.


TCustomMemo.::SetWordWrap
 CLX 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.


TCustomMemo.::SetWrapBreak
 CLX Reference

TCustomMemo.SetWrapBreak

TCustomMemo	See also

Sets the WrapBreak property.

type TWrapBreak = (wbWhitespace, wbAnywhere);

procedure SetWrapBreak(const Value: TWrapBreak);

Description

SetWrapBreak is the property access method for the WrapBreak property.


TCustomMemo.::SetWrapMode
 CLX Reference

TCustomMemo.SetWrapMode

TCustomMemo	See also

Sets the WrapMode property.

type TWrapMode = (wmNone, wmWidth, wmPixel, wmColumn);

procedure SetWrapMode(const Value: TWrapMode);

Description

SetWrapMode is the property access method for the WrapMode property.


TCustomMemo.::SetWrapValue
 CLX Reference

TCustomMemo.SetWrapValue

TCustomMemo	See also

Sets the WrapAtValue property.

procedure SetWrapValue(const Value: Integer);

Description

SetWrapValue is the property access method for the WrapAtValue property.


TCustomMemo.UnSelect
 CLX Reference

TCustomMemo.UnSelect

TCustomMemo	See also

Deselects all text and leaves the cursor at the current position.

procedure UnSelect;

Description

UnSelect deselects all text and leaves the cursor at the current position.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomMemo


TCustomMemoryStream
 CLX 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.


 CLX Reference

TCustomMemoryStream properties

TCustomMemoryStream	Alphabetically	Legend

In TCustomMemoryStream

Memory

Derived from TStream

Position

Size


 CLX Reference

TCustomMemoryStream properties

TCustomMemoryStream	By object	Legend

Memory

Position

Size


TCustomMemoryStream.Memory
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TCustomPanel
 CLX Reference

TCustomPanel

Hierarchy	Properties	Methods	See also

TCustomPanel is the base class for all panel components.

Unit

QExtCtrls

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 .


 CLX Reference

TCustomPanel properties

TCustomPanel	Alphabetically	Legend

In TCustomPanel

Alignment

BevelInner

BevelOuter

BevelWidth

BorderStyle

BorderWidth

Caption

Handle

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomPanel properties

TCustomPanel	By object	Legend

Action

Align

Alignment

Anchors

BevelInner

BevelOuter

BevelWidth

BorderStyle

BorderWidth

BoundsRect

Brush

Caption

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentWidget

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width


TCustomPanel.Alignment
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TCustomPanel.BorderStyle

TCustomPanel	See also

Determines the style of the line drawn around the perimeter of the panel control.

property BorderStyle: TControlBorderStyle;

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
 CLX 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.Caption
 CLX Reference

TCustomPanel.Caption

TCustomPanel	See also

Specifies a text string that appears inside the panel.

type TCaption = String;

property Caption: TCaption;

Description

Use Caption to specify a string that appears inside the panel. For example, if the panel is used as a status bar, Caption is the text of the status message.


TCustomPanel.FullRepaint
 CLX Reference

TCustomPanel.FullRepaint

TCustomPanel	See also

Determines how the panel repaints itself when it is resized.

property FullRepaint: Boolean;

Description

On Windows, 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.

On Linux, the FullRepaint property is not used.


TCustomPanel.Handle
 CLX Reference

TCustomPanel.Handle

TCustomPanel

Specifies the handle of the underlying Qt Widget.

property Handle: QFrameH;

Description

Handle is a 4-byte identifier that uniquely represents the underlying Widget instance. Use this handle when making low-level function calls into the Qt shared libraries, where the function call requires an instance handle.


TCustomPanel.Locked
 CLX Reference

TCustomPanel.Locked

TCustomPanel

Not used.

property Locked: Boolean;

Description

The Locked property is included only for compatibility with the Windows version of TCustomPanel.


 CLX Reference

TCustomPanel methods

TCustomPanel	Alphabetically	Legend

In TCustomPanel

AdjustClientRect

Create

CreateWidget

GetText

Invalidate

Paint

SetText

Derived from TCustomControl

Destroy

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomPanel methods

TCustomPanel	By object	Legend

AdjustClientRect

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

CreateWidget

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetText

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

Paint

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetText

Show

Update

UpdateAction

UpdateControlState


TCustomPanel.AdjustClientRect
 CLX 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.Create
 CLX 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.CreateWidget
 CLX Reference

TCustomPanel.CreateWidget

TCustomPanel	See also

Creates the underling widget for the panel.

procedure CreateWidget; override;

Description

CreateWidget is called automatically when the TCustomPanel object needs to instantiate the underlying widget on which it is based. CreateWidget generates a new widget instance, and sets its handle as the value of the Handle property.


TCustomPanel.GetText
 CLX Reference

TCustomPanel.GetText

TCustomPanel	See also

Returns the value of the Caption property.

type TCaption = string;

function GetText: TCaption; override;

Description

GetText is the protected read implementation of the Caption property.


TCustomPanel.Invalidate
 CLX Reference

TCustomPanel.Invalidate

TCustomPanel	See also

Schedules a repaint of the panel.

procedure Invalidate; override;

Description

Call Invalidate to indicate that the entire surface of the panel 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 panel is actually repainted.

The actual repaint does not occur until the panel is updated. To force an immediate repaint, call Repaint instead.


TCustomPanel.Paint
 CLX 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.


TCustomPanel.SetText
 CLX Reference

TCustomPanel.SetText

TCustomPanel	See also

Sets the value of the Caption property.

type TCaption = string;

procedure SetText(const Value: TCaption); override;

Description

SetText is the protected write implementation of the Caption property. It sets the Caption property to the string specified by Value and then invalidates the panel so that the new value is drawn.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomControl

TCustomPanel


TCustomRadioGroup
 CLX Reference

TCustomRadioGroup

Hierarchy	Properties	Methods	See also

TCustomRadioGroup is the base class for radio-group components.

Unit

QExtCtrls

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.


 CLX Reference

TCustomRadioGroup properties

TCustomRadioGroup	Alphabetically	Legend

In TCustomRadioGroup

Columns

Handle

ItemIndex

Items

Orientation

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomRadioGroup properties

TCustomRadioGroup	By object	Legend

Action

Align

Anchors

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Columns

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

ItemIndex

Items

Left

Name

Orientation

Owner

Parent

ParentWidget

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width


TCustomRadioGroup.Columns
 CLX Reference

TCustomRadioGroup.Columns

TCustomRadioGroup	See also

Specifies number of columns in the radio group.

property Columns: Integer;

Description

Columns determines the number of columns in the radio group if Orientation is orVertical (the default), and the number of rows if Orientation is orHorizontal. Its value can range from 1 to 16. The default value is 1, which means that the radio buttons are arranged in a single line.


TCustomRadioGroup.Handle
 CLX Reference

TCustomRadioGroup.Handle

TCustomRadioGroup

Specifies the handle of the underlying Qt Widget.

property Handle: QButtonGroupH;

Description

Handle is a 4-byte identifier that uniquely represents the underlying Widget instance. Use this handle when making low-level function calls into the Qt shared libraries, where the function call requires an instance handle.


TCustomRadioGroup.ItemIndex
 CLX 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
 CLX 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 radio buttons generated by TCustomRadioGroup. Independently created TRadioButton instances cannot be included in a radio group.

Tip:	The radio group does not resize when you add or delete radio buttons. Be sure to resize the control appropriately when changing the number of items.


TCustomRadioGroup.Orientation
 CLX Reference

TCustomRadioGroup.::Orientation

TCustomRadioGroup	See also

Specifies whether the radio buttons are organized into rows or columns.

type TOrientation = (orVertical, orHorizontal);

property Orientation: TOrientation;

Description

Orientation controls whether the radio buttons are arranged by row or by column. The following table describes the possible values:

Value	Meaning

orVertical	radio buttons are arranged in one or more rows.

orHorizontal	radio buttons are arranged in one or more columns. Note that when the Orientation is horizontal, the Columns property refers to the number of rows.

Note:	Use the Columns property to specify the number of rows or columns used when laying out the radio group.


 CLX Reference

TCustomRadioGroup methods

TCustomRadioGroup	Alphabetically	Legend

In TCustomRadioGroup

CanModify

Create

CreateWidget

CursorChanged

Destroy

EventFilter

HookEvents

Loaded

RestoreWidgetState

SaveWidgetState

SetFocus

ShowingChanged

WantKey

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomRadioGroup methods

TCustomRadioGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

CanModify

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

CreateWidget

CursorChanged

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

EventFilter

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

HookEvents

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

Loaded

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

RestoreWidgetState

SafeCallException

SaveWidgetState

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

ShowingChanged

Update

UpdateAction

UpdateControlState

WantKey


TCustomRadioGroup.CanModify
 CLX 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
 CLX Reference

TCustomRadioGroup.Create

TCustomRadioGroup	See also

Creates and initializes a TCustomRadioGroup instance.

constructor Create(AOwner: TComponent); override;

Description


TCustomRadioGroup.CreateWidget
 CLX Reference

TCustomRadioGroup.CreateWidget

TCustomRadioGroup	See also

Instantiates the underlying widget that implements the radio group.

procedure CreateWidget; override;

Description

CreateWidget is called automatically when the radio group needs to instantiate the underlying widget on which it is based. CreateWidget generates a new widget instance, and sets its handle as the value of the Handle property.

Do not call the CreateWidget method. To cause the radio group to create its underlying widget, call the HandleNeeded method or read the Handle property instead.


TCustomRadioGroup.CursorChanged
 CLX Reference

TCustomRadioGroup.CursorChanged

TCustomRadioGroup	See also

Updates the cursor of the buttons in the radio group.

procedure CursorChanged; override;

Description

CursorChanged is called automatically when the Cursor property changes. In TCustomRadioGroup, it responds by updating the Cursor property of every button in the radio group.


TCustomRadioGroup.Destroy
 CLX 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.EventFilter
 CLX Reference

TCustomRadioGroup.EventFilter

TCustomRadioGroup	See also

Responds to system events.

function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; override;

Description

EventFilter is called automatically in response to events detected by the underlying widget. Such events include mouse events, keyboard events, system changes (such as changes to the palette), and changes to the underlying widget (moves, resizes, or the need to repaint). EventFilter gives the control an opportunity to respond to the event that occurred.

Sender is the handle to the underlying widget that receives the event. Typically, this is the same as the Handle property.

Event is the handle to the Qt event object. Use this object to determine the type of event that occurred and obtain information about the event.

EventFilter returns True if the radio group handles the event, False otherwise.

TCustomRadioGroup overrides the inherited method to prevent the default response (an OnKeyDown event) to the Tab key.

Note:	When overriding the EventFilter method, be sure to call the inherited method so that the default event processing can occur.


TCustomRadioGroup.HookEvents
 CLX Reference

TCustomRadioGroup.HookEvents

TCustomRadioGroup	See also

Registers callbacks for handling system event events and widget signals.

procedure HookEvents; override;

Description

HookEvents is called automatically when the underlying widget is created. It registers the callbacks that allow a control to respond to events detected by the widget.

In TCustomRadioGroup, HookEvents registers a callback that responds to Qt mouse click events by ensuring that the correct radio button has input focus before generating an OnClick event. After registering its own callback, HookEvents calls the inherited method, which registers the EventFilter method to respond to all system events.

Note:	When overriding the HookEvents method, be sure to call the inherited method so that ancestor classes register their own callbacks. For more information about overriding HookEvents, see TWidgetControl.HookEvents.


TCustomRadioGroup.Loaded
 CLX 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.RestoreWidgetState
 CLX Reference

TCustomRadioGroup.RestoreWidgetState

TCustomRadioGroup	See also

Restores the underlying widget to reflect a state that was stored in memory.

procedure RestoreWidgetState; override;

Description

RestoreWidgetState is called automatically when TCustomRadioGroup recreates the underlying widget. This allows the component to destroy and regenerate the underlying widget when necessary without losing information.

In TCustomRadioGroup, RestoreWidgetState restores the radio buttons in the group and the value of the Caption property.

Note:	When overriding the RestoreWidgetState method, be sure to call the inherited method so that ancestor classes can restore their state as well.


TCustomRadioGroup.SaveWidgetState
 CLX Reference

TCustomRadioGroup.SaveWidgetState

TCustomRadioGroup	See also

Saves state information when the underlying widget is destroyed.

procedure SaveWidgetState; override;

Description

The protected DestroyHandle method calls SaveWidgetState to let controls temporarily save any information that is stored only in the underlying widget before that widget is freed. When the widget is later recreated, the information can be reinstated using the RestoreWidgetState method. This allows the control to destroy and regenerate the underlying widget when necessary without losing information.

In TCustomRadioGroup, SaveWidgetState frees the radio buttons in the group but does not need to store any information because it is already encapsulated in the radio group’s properties.

Note:	When overriding the SaveWidgetState method, be sure to call the inherited method so that ancestor classes can save their state as well.


TCustomRadioGroup.SetFocus
 CLX Reference

TCustomRadioGroup.SetFocus

TCustomRadioGroup	See also

Gives input focus to the radio group or the selected button within the group.

procedure SetFocus; override;

Description

Call SetFocus to assign input focus to the radio group.

TCustomRadioGroup overrides the inherited method to pass the input focus on to the selected button if the ItemIndex property specifies that a button is selected.


TCustomRadioGroup.ShowingChanged
 CLX Reference

TCustomRadioGroup.ShowingChanged

TCustomRadioGroup	See also

Provides adjustments when the Visible property changes.

procedure ShowingChanged; override;

Description

ShowingChanged is called automatically immediately after the value of the Visible property changes. It performs the following tasks:

Forces a repaint.

Makes sure the radio group does not have focus when it is not visible.

Updates the ControlState property.

Makes sure that the radio buttons are laid out to reflect current property settings.


TCustomRadioGroup.WantKey
 CLX Reference

TCustomRadioGroup.WantKey

TCustomRadioGroup	See also

Processes keystrokes.

function WantKey(Key: Integer; Shift: TShiftState; const KeyText: WideString): Boolean; override;

Description

WantKey tries to handle the keystroke message specified by the Key and Shift parameters.

Key is the integer representation of the key that the user pressed. This can be the ordinal value of the character, or a symbolic key code.

Shift indicates whether the Shift, Alt, and/or Control keys were simultaneously pressed.

KeyText is the character value of the key that was pressed.

WantKey returns True if the method handled the keystroke, False otherwise.

As implemented in TCustomRadioGroup, WantKey passes the keystroke message, in index order, to every radio button in the group. If a radio button indicates it wants the keystroke, WantKey simulates a mouse click on that radio button.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomControl

TCustomGroupBox

TCustomRadioGroup


TCustomTabControl
 CLX Reference

TCustomTabControl

Hierarchy	Properties	Methods	Events	See also

TCustomTabControl is the base type for tab-control components such as TTabControl and TPageControl.

Unit

QComCtrls

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.


 CLX Reference

TCustomTabControl Properties

TCustomTabControl	Alphabetically	Legend

In TCustomTabControl

DisplayRect

HotImages

HotTrack

HotTrackColor

ImageBorder

Images

MultiLine

MultiSelect

OwnerDraw

RaggedRight

RowCount

ShowFrame

Style

TabHeight

TabIndex

Tabs

TabWidth

Derived from TCustomControl

Canvas

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomTabControl Properties

TCustomTabControl	By Object	Legend

Action

Align

Anchors

BoundsRect

Brush

Canvas

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DisplayRect

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HotImages

HotTrack

HotTrackColor

ImageBorder

Images

Left

MultiLine

MultiSelect

Name

Owner

OwnerDraw

Parent

ParentWidget

RaggedRight

RowCount

ShowFrame

ShowHint

Showing

Style

TabHeight

TabIndex

TabOrder

Tabs

TabStop

TabWidth

Tag

Top

Visible

Width


TCustomTabControl.DisabledImages
 CLX Reference

 TCustomTabControl.DisabledImages

TCustomTabControl	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 tabs when they are disabled. Each tab’s ImageIndex property determines the specific image displayed on it. If DisabledImages is unassigned, disabled tabs display grayed versions of their regular images (specified by the Images property).


TCustomTabControl.DisplayRect
 CLX 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.HotImages
 CLX Reference

 TCustomTabControl.HotImages

TCustomTabControl	See also

Lists the images that appear tabs when the mouse passes over them.

property HotImages: TCustomImageList;

Description

HotImages contains a list of images that can appear on tabs when the mouse passes over while the tab is enabled. Each tab’s ImageIndex property determines the specific image displayed on it. If DisabledImages is unassigned, disabled tabs display grayed versions of their regular images (specified by the Images property).


TCustomTabControl.HotTrack
 CLX 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.HotTrackColor
 CLX Reference

 TCustomTabControl.HotTrackColor

TCustomTabControl	See also

Specifies the color used to paint the tab under the mouse when HotTrack is True.

property HotTrackColor: TColor

Description

Set HotTrackColor to the color that the tab control should paint the tab under the mouse when HotTrack is True.


TCustomTabControl.Images
 CLX 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. If DisabledImages is defined, those images are used instead for disabled tabs; otherwise, grayed versions of the Images images are used. If HotImages is defined, those images are used when the mouse passes over an enabled tab.

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.ImageBorder
 CLX Reference

TCustomTabControl.ImageBorder

TCustomTabControl	See also

Specifies the size of the border of the tab images.

property ImageBorder: Integer;

Description

ImageBorder specifies the size of the border drawn around each tab image, in pixels.


TCustomTabControl.MultiLine
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.ShowFrame
 CLX Reference

TCustomTabControl.ShowFrame

TCustomTabControl	See also

Indicates whether the tab control should paint its frame.

property ShowFrame: Boolean;

Description

ShowFrame indicates whether a frame is drawn around the tab control.


TCustomTabControl.Style
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TCustomTabControl Events

TCustomTabControl	Alphabetically	Legend

In TCustomTabControl

OnChange

OnChanged

OnChanging

OnDrawTab

OnGetImageIndex


 CLX Reference

TCustomTabControl Events

TCustomTabControl	By Object	Legend

OnChange

OnChanged

OnChanging

OnDrawTab

OnGetImageIndex


TCustomTabControl.OnChange
 CLX 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.OnChanged
 CLX Reference

TCustomTabControl.OnChanged

TCustomTabControl	See Also

Occurs after a new tab is selected.

type TTabChangedEvent = procedure(Sender: TObject; TabID: Integer) of object;

property OnChanged: TTabChangedEvent;

Description

The OnChanged event handler is called immediately after the selected tab changes.

Sender is the tab control whose selected tab changed.

TabID is the index of the tab that used to be selected.


TCustomTabControl.OnChanging
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TCustomTabControl Methods

TCustomTabControl	Alphabetically	Legend

In TCustomTabControl

AdjustClientRect

AdjustTabClientRect

AdjustTabRect

BeginUpdate

CanChange

CanShowTab

Change

Changed

Create

Destroy

DoMouseWheel

DoMouseWheelDown

DoMouseWheelUp

DrawTab

EnabledChanged

EndUpdate

FontChanged

GetImageIndex

ImageListChange

IndexOfTabAt

KeyUp

LayoutTabs

Loaded

MouseDown

MouseLeave

MouseMove

MouseUp

Notification

Paint

RequestAlign

RequestLayout

Resize

ScrollTabs

TabRect

UpdateTabImages

WantKey

WidgetFlags

Derived from TCustomControl

Invalidate

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomTabControl Methods

TCustomTabControl	By Object	Legend

AdjustClientRect

AdjustTabClientRect

AdjustTabRect

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BeginUpdate

BringToFront

Broadcast

CanChange

CanFocus

CanShowTab

Change

Changed

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DoMouseWheel

DoMouseWheelDown

DoMouseWheelUp

DragDrop

Dragging

DrawTab

EnableAlign

EnabledChanged

EndDrag

EndUpdate

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

FontChanged

Free

FreeInstance

FreeNotification

GetImageIndex

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

ImageListChange

IndexOfTabAt

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

KeyUp

LayoutTabs

Loaded

MethodAddress

MethodName

MouseDown

MouseLeave

MouseMove

MouseUp

NewInstance

Notification

Paint

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

RequestAlign

RequestLayout

Resize

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollTabs

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

TabRect

Update

UpdateAction

UpdateControlState

UpdateTabImages

WantKey

WidgetFlags


TCustomTabControl.AdjustClientRect
 CLX 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.AdjustTabClientRect
 CLX Reference

TCustomTabControl.AdjustTabClientRect

TCustomTabControl	See also

Calculates the client area of an individual tab.

procedure AdjustTabClientRect(var Rect: TRect); virtual;

Description

AdjustTabClientRect is called automatically when the control needs to determine the client area actually available to an individual tab. As implemented in TCustomTabControl, AdjustTabClientRect refers to the Style property and modifies the client area in Rect to leave room for the particular style's borders.


TCustomTabControl.AdjustTabRect
 CLX Reference

TCustomTabControl.AdjustTabRect

TCustomTabControl	See also

Calculates the area available for displaying tabs.

procedure AdjustTabRect(var Rect: TRect); virtual;

Description

AdjustTabRect is called automatically when the control needs to determine the client area available to the tabs. As implemented in TCustomTabControl, AdjustTabRect refers to the Style property and modifies the client area in Rect to leave room for the particular style's borders.


TCustomTabControl.BeginUpdate
 CLX Reference

TCustomTabControl.BeginUpdate

TCustomTabControl	See also

Suspends update processing.

procedure BeginUpdate;

Description

Call BeginUpdate when making a series changes to the control's appearance or state. When all changes have been made, call EndUpdate to implement them. Bracketing control changes with BeginUpdate and EndUpdate minimizes screen flicker and makes the application more efficient. Calls to BeginUpdate and EndUpdate can be nested.


TCustomTabControl.CanChange
 CLX 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
 CLX 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 TWidgetControl.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
 CLX 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.Changed
 CLX Reference

TCustomTabControl.Changed

TCustomTabControl	See Also

Generates an OnChanged event.

procedure Changed(Value: Integer); dynamic;

Description

Change is a protected method that is called automatically when the selected tab changes. Descendant classes can modify the default response (call the OnChanged event handler) by overriding this method.


TCustomTabControl.Create
 CLX 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.Destroy
 CLX 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.DoMouseWheel
 CLX Reference

TCustomTabControl.DoMouseWheel

TCustomTabControl	See also

Respond to mouse wheel events.

function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; const MousePos: TPoint): Boolean; override;

Description

TCustomTabControl overrides DoMouseWheel to enforce a return value of True This causes all mouse wheel events to be handled by the control's parent.

Shift indicates the current state of the Shift, Ctrl, and Alt 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.


TCustomTabControl.DoMouseWheelDown
 CLX Reference

TCustomTabControl.DoMouseWheelDown

TCustomTabControl 	See also

Performs tasks when the mouse wheel is rotated downward.

function DoMouseWheelDown(Shift: TShiftState; const MousePos: TPoint): Boolean; override;

Description

TCustomTabControl overrides DoMouseWheelDown in order to convert between Qt tab indexes and CLX tab indexes.


TCustomTabControl.DoMouseWheelUp
 CLX Reference

TCustomTabControl.DoMouseWheelUp

TCustomTabControl 	See also

Performs tasks when the mouse wheel is rotated Upward.

function DoMouseWheelUp(Shift: TShiftState; const MousePos: TPoint): Boolean; override;

Description

TCustomTabControl overrides DoMouseWheelUp in order to convert between Qt tab indexes and CLX tab indexes.


TCustomTabControl.DrawTab
 CLX 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.EnabledChanged
 CLX Reference

TCustomTabControl.EnabledChanged

TCustomTabControl	See also

Responds to changes in the Enabled property.

procedure EnabledChanged; override;

Description

EnabledChanged is called automatically when the Enabled property changes.

As implemented in TCustomTabControl, EnabledChanged calls the inherited method, then enables the tab scroll buttons, provided that Enabled is True and scrolling is required to handle all the tab buttons.


TCustomTabControl.EndUpdate
 CLX Reference

TCustomTabControl.EndUpdate

TCustomTabControl	See also

Re-enables update processing.

procedure EndUpdate;

Description

EndUpdate terminates a sequence of control changes initiated by BeginUpdate.


TCustomTabControl.FontChanged
 CLX Reference

TCustomTabControl.FontChanged

TCustomTabControl 	See also

Responds to changes in the Font property.

procedure FontChanged; override;

Description

FontChanged is called automatically when the Font property changes.

As implemented in TCustomTabControl, FontChanged calls the inherited method, then sets the font of the control’s Canvas to match. Finally, FontChanged makes any adjustments necessary to the layout of the control to reflect the new font.


TCustomTabControl.GetImageIndex
 CLX 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.ImageListChange
 CLX Reference

TCustomTabControl.ImageListChange

TCustomTabControl	See also

Responds to changes in any of the image lists.

procedure ImageListChange(Sender: TObject); virtual;

Description

ImageListChange is called automatically when any of the image lists that the tab control uses change. This can be a change to the Images, HotImages, or DisabledImages property list.

ImagelistChange ensures that the layout of tabs can accommodate the new images.


TCustomTabControl.IndexOfTabAt
 CLX 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.KeyUp
 CLX Reference

TCustomTabControl.KeyUp

TCustomTabControl	See also

Responds when the user releases a key.

procedure KeyUp(var Key: Word; Shift: TShiftState); override;

Description

TCustomTabControl overrides KeyUp to add support for keyboard navigation between tabs.


TCustomTabControl.LayoutTabs
 CLX Reference

TCustomTabControl.LayoutTabs

TCustomTabControl	See also

Calculates the positions for the control’s tabs.

procedure LayoutTabs; virtual;

Description

LayoutTabs is called automatically when the positions of tabs need to be calculated. Descendent classes can override LayoutTabs to implement a new layout algorithm.


TCustomTabControl.Loaded
 CLX 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.MouseDown
 CLX Reference

TCustomTabControl.MouseDown

TCustomTabControl	See also

Responds when the user presses a mouse button.

procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

TCustomTabControl overrides MouseDown in order to add support for hot tracking when the control Style is tsFlatButtons.

Button indicates the mouse button that was clicked.

Shift indicates the concurrent state of the Ctrl, Alt, and Shift keys.

X and Y indicate the current coordinates of the mouse.


TCustomTabControlMouseLeave
 CLX Reference

TCustomTabControl.MouseLeave

TCustomTabControl	See also

Respond to mouse moving away from tab.

procedure MouseLeave(Shift: TShiftState; X, Y: Integer); override;

Description

TCustomTabControl overrides MouseLeave to add support for hot tracking when the control Style is tsFlatButtons.

Shift indicates the concurrent state of the Ctrl, Alt, and Shift keys.

X and Y indicate the current coordinates of the mouse.


TCustomTabControl.MouseMove
 CLX Reference

TCustomTabControl.MouseMove

TCustomTabControl	See also

Responds when the user moves the mouse over the tab control.

procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;

Description

TCustomTabControl overrides MouseMove to add support for hot tracking when the control Style is tsFlatButtons.

Shift indicates the concurrent state of the Ctrl, Alt, and Shift keys.

X and Y indicate the current coordinates of the mouse.


TCustomTabControl.MouseUp
 CLX Reference

TCustomTabControl.MouseUp

TCustomTabControl	See also

Responds when the user releases a mouse button.

procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

TCustomTabControl overrides MouseUp to add support for hot tracking when the control Style is tsFlatButtons.

Button indicates the mouse button that was released.

Shift indicates the concurrent state of the Ctrl, Alt, and Shift keys.

X and Y indicate the current coordinates of the mouse.


TCustomTabControl.Notification
 CLX 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.Paint
 CLX Reference

TCustomTabControl.Paint

TCustomTabControl	See also

Renders the image of the tab control.

procedure Paint; override;

Description

TCustomTabControl augments the inherited paint method by adding the logic necessary to render the tabs.


TCustomTabControl.RequestAlign
 CLX Reference

TCustomTabControl.RequestAlign

TCustomTabControl	See also

Instructs the parent of the tab control to reposition the tab control, enforcing its Align property.

procedure RequestAlign; override;

Description

After instructing its parent to reposition the tab control to reflect the value of its Align property, RequestAlign adjusts the layout of the tabs so that they reflect any changes to the dimensions of the tab control.


TCustomTabControl.RequestLayout
 CLX Reference

TCustomTabControl.RequestLayout

TCustomTabControl

Responds when the tab control needs to adjust the layout of its tabs.

procedure RequestLayout; dynamic;

Description

RequestLayout is called automatically when an event, such as a font change, invalidates the current tab layout. As implemented in TCustomTabControl, RequestLayout invalidates the control in such a way that the resulting Paint call recalculates the tab layout.


TCustomTabControl.Resize
 CLX Reference

TCustomTabControl.Resize

TCustomTabControl	See also

Responds when the dimensions of the tab control change.

procedure Resize; override;

Description

Resize is called automatically when the dimensions of the tab control change. It generates an OnResize event, and then recalculates the layout of the tabs to reflect the new dimensions.


TCustomTabControl.RowCount
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TCustomTabControl.WantKey
 CLX Reference

TCustomTabControl.WantKey

TCustomTabControl	See also

Handles keystrokes when the tab control does not have focus.

function WantKey(Key: Integer; Shift: TShiftState; KeyText: string): Boolean; override;

Description

TCustomTabControl overrides WantKey in order to implement accelerator key support.

Key is the integer representation of the key that the user pressed. This can be the ordinal value of the character, or a symbolic key code.

Shift indicates whether the Shift, Alt, and/or Control keys were simultaneously pressed.

KeyText is the character value of the key that was pressed.

WantKey returns True if the method handled the keystroke, False otherwise.


TCustomTabControl.WidgetFlags
 CLX Reference

TCustomTabControl.WidgetFlags

TCustomTabControl	See also

Determines the Qt widget flags.

function WidgetFlags: Integer; override;

Description

TCustomTabControl overrides WidgetFlags in order to set the WRepaintNoErase widget flag.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomControl

TCustomTabControl


TCustomViewItem
 CLX Reference

TCustomViewItem

Hierarchy	Properties	Methods	See also

TCustomViewItem is an individual item of a TListView control.

Unit

QComCtrls

Description

Use TCustomViewItem to specify the appearance and data associations of an item in a view. All the items of the view are collected by a TCustomViewItems object to make up the Items property of the TCustomViewControl object.


 CLX Reference

TCustomViewItem Properties

TCustomViewItem	Alphabetically	Legend

In TCustomViewItem

Caption

Checked

ChildCount

Data

Expandable

Expanded

Focused

Height

ImageIndex

Index

ItemType

Owner

Parent

Selectable

Selected

States

SubItemImages

SubItems

TotalHeight

Width


 CLX Reference

TCustomViewItem Properties

TCustomViewItem	By Object	Legend

Caption

Checked

ChildCount

Data

Expandable

Expanded

Focused

Height

ImageIndex

Index

ItemType

Owner

Parent

Selectable

Selected

States

SubItemImages

SubItems

TotalHeight

Width


TCustomViewItem.Caption
 CLX Reference

TCustomViewItem.Caption

TCustomViewItem	See also

Specifies the text that labels the item in the list.

property Caption: string;

Description

Use Caption to name the item. The Caption appears with an associated image that depends on the ViewStyle property of the view.

If the ReadOnly property of the view is False, the user can edit the caption.


TCustomViewItem.Checked
 CLX Reference

TCustomViewItem.Checked

TCustomViewItem	See also

Determines whether a check mark appears next to the 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:	The Checked property is useful only if the view supports it. TCustomTreeView does not support items with check boxes. TCustomListView does support items with check boxes, provided the CheckBoxes property is True.


TCustomViewItem.ChildCount
 CLX Reference

TCustomViewItem.ChildCount

TCustomViewItem

Returns number of child items.

property ChildCount: Integer;

Description

ChildCount returns the number of items that are children of this item.


TCustomViewItem.Data
 CLX Reference

TCustomViewItem.Data

TCustomViewItem

Specifies any application-specific data associated with the item.

property Data: Pointer;

Description

Use Data to associate arbitrary application data with the item.


TCustomViewItem.Expandable
 CLX Reference

TCustomViewItem.Expandable

TCustomViewItem	See also

Specifies whether the item is Expandable.

property Expandable: Boolean;

Description

When a tree node is Expandable, it can have child items which can be shown or hidden by expanding or collapsing the item.

The Expandable property is used with views that support hierarchical browsing, such as TCustomTreeView.


TCustomViewItem.Expanded
 CLX Reference

TCustomViewItem.Expanded

TCustomViewItem

Specifies whether the item is expanded.

property Expanded: Boolean;

Description

When an item expanded, the minus button is shown if the ShowButtons property of the view is True and child nodes are displayed. Set Expanded to True to display the children of an item. Set Expanded to False to collapse the item, hiding all of its descendants.

The Expanded property is used with views that support hierarchical browsing, such as TCustomTreeView.


TCustomViewItem.Focused
 CLX Reference

TCustomViewItem.Focused

TCustomViewItem	See also

Indicates whether the 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 view to False. When the item is Focused, it appears surrounded by a standard focus rectangle.


TCustomViewItem.Height
 CLX Reference

TCustomViewItem.Height

TCustomViewItem 	See also

Returns item height.

property Height: Integer;

Description

Height returns the height, in pixels, of the item itself, not including any child items.


TCustomViewItem.ImageIndex
 CLX Reference

TCustomViewItem.ImageIndex

TCustomViewItem

Determines which image is displayed as the icon for the item.

property ImageIndex: TImageIndex;

Description

Set ImageIndex to associate the list item with one of the view's Images.


TCustomViewItem.Index
 CLX Reference

TCustomViewItem.Index

TCustomViewItem	See also

Indicates the position of the list item in the view.

property Index: Integer;

Description

Use Index to locate the item in the view. The first item has an index of 0, the second item has an index of 1, and so on.


TCustomViewItem.ItemType
 CLX Reference

TCustomViewItem.ItemType

TCustomViewItem	See also

Specifies item type.

property ItemType: TListViewItemType;

Description

Item type specifies what special features the item supports. Always call BeginUpdate for the view's item manager object before changing this property. To access the item manager, use the item's Owner property, the list view's Items property, or the tree view's Items property.


TCustomViewItem.Owner
 CLX Reference

TCustomViewItem.Owner

TCustomViewItem

Specifies the TCustomViewItems object that owns the list item.

property Owner: TCustomViewItems;

Description

Use Owner to access the TCustomViewItems object that manages all the items for the view. Use the methods of the Owner object to delay updates while modifying the items.

Note	The Owner property does not refer to the view control. The item is owned by a TCustomViewItems object, which is in turn owned by the view.


TCustomViewItem.Parent
 CLX Reference

TCustomViewItem.Parent

TCustomViewItem	See also 	Example

Specifies the parent item.

property Parent: TCustomViewItem;

Description

In a hierarchical view, such as TCustomTreeView, Parent refers to the parent item of the current item. The current item is hidden when the parent is collapsed, and indented underneath the parent when the parent is expanded.


TCustomViewItem.Selectable
 CLX Reference

TCustomViewItem.Selectable

TCustomViewItem	See also

Indicates whether the item is selectable.

property Selectable: Boolean;

Description

Set Selectable to False to prevent the item from being selected. If the item was selected before Selectable was set to False, it will remain selected until the selection is removed in the usual way. The item can still receive the focus and be edited by the user.


TCustomViewItem.Selected
 CLX Reference

TCustomViewItem.Selected

TCustomViewItem	See also

Indicates whether the item is selected.

property Selected: Boolean;

Description

Use Selected to select or unselect the item. If the MultiSelect property of the view is False, setting Selected to True sets the Selected property of all other items to False. The appearance of a selected item depends on whether it has focus and whether the system colors are used for selection.

If the item's Selectable property is False, the item cannot be selected, and assigning True to Selected does not change the value of the property. Selected can still return True while Selectable is False if the item was selected before Selectable was set to False.


TCustomViewItem.States
 CLX Reference

TCustomViewItem.States

TCustomViewItem

Item state information.

property States: TItemStates

Description

The States property returns item state information. This set property can include isNone (default state), isFocused (has the focus), isSelected (is selected), and isActivating (active).


TCustomViewItem.SubItemImages
 CLX Reference

TCustomViewItem.SubItemImages

TCustomViewItem	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 Images property, where 0 identifies the first image in Images.

The Index parameter identifies the subitem. It corresponds to the index of the subitem string in the SubItems property.


TCustomViewItem.SubItems
 CLX Reference

TCustomViewItem.SubItems

TCustomViewItem	See also 	Example

Contains strings that appear as subitems.

property SubItems: TStrings;

Description

Use SubItems to add strings that appear in the additional columns to the right of the item when multiple columns are visible. The TStrings object that implements the SubItems property is created when the item is created.


TCustomViewItem.TotalHeight
 CLX Reference

TCustomViewItem.TotalHeight

TCustomViewItem 	See also

Returns total height of items and child items.

property TotalHeight: Integer;

Description

TotalHeight returns the total height, in pixels, of the item and its visible child items.


TCustomViewItem.Width
 CLX Reference

TCustomViewItem.Width

TCustomViewItem 	See also

Returns item width.

property Width: Integer;

Description

Width returns the width, in pixels, of the item.


 CLX Reference

TCustomViewItem Methods

TCustomViewItem	Alphabetically	Legend

In TCustomViewItem

AssignTo

Create

Delete

Destroy

DisplayRect

MakeVisible

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


 CLX Reference

TCustomViewItem Methods

TCustomViewItem	By Object	Legend

AfterConstruction

Assign

AssignTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Delete

Destroy

Dispatch

DisplayRect

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MakeVisible

MethodAddress

MethodName

NewInstance

SafeCallException


TCustomViewItem.AssignTo
 CLX Reference

TCustomViewItem.AssignTo

TCustomViewItem	See also

Copies the properties the item to another item.

procedure AssignTo(Dest: TPersistent); override;

Description

If Dest is a TCustomViewItem, AssignTo copies this item's Selected, Selectable, Expanded, Expandable, Caption, Checked, Data, Focused, ImageIndex, and SubItems properties to Dest.


TCustomViewItem.Create
 CLX Reference

TCustomViewItem.Create

TCustomViewItem	See also

Creates an instance of TCustomViewItem.

constructor Create(AOwner: TCustomViewItems);

Description

Call Create to instantiate an item at runtime. Items added to a view at design time are created automatically. Use the methods of the TCustomViewItems object instead to create items as part of an view.


TCustomViewItem.Delete
 CLX Reference

TCustomViewItem.Delete

TCustomViewItem	See also

Deletes the item from its view.

procedure Delete;

Description

Use the Delete method to delete an item. Delete removes the item from the view and frees all associated memory by calling the Free method.


TCustomViewItem.Destroy
 CLX Reference

TCustomViewItem.Destroy

TCustomViewItem	See also

Destroys an instance of TCustomViewItem.

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.


TCustomViewItem.DisplayRect
 CLX Reference

TCustomViewItem.DisplayRect

TCustomViewItem

Returns display rectangle.

function DisplayRect: TRect;

Description

DisplayRect returns the item's bounding rectangle.


TCustomViewItem.MakeVisible
 CLX Reference

TCustomViewItem.MakeVisible

TCustomViewItem

Make sure the item is visble.

procedure MakeVisible(PartialOK: Boolean);

Description

MakeVisible makes the item visible, vertically scrolling the view and expanding parent items as necessary. MakeVisible does nothing if the full height of the item is visible. If PartialOK is True, MakeVisible does nothing if the item is partially visible.


Hierarchy

TObject

TPersistent

TCustomViewItem


TDataModule
 CLX 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, or TImageList).

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.


 CLX Reference

TDataModule properties

TDataModule	Alphabetically	Legend

In TDataModule

DesignOffset

DesignSize

OldCreateOrder

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TDataModule properties

TDataModule	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DesignOffset

DesignSize

Name

OldCreateOrder

Owner

Tag


TDataModule.DesignOffset
 CLX 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
 CLX 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
 CLX 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).

When OldCreateOrder is True, OnCreate is triggered from the data module constructor and OnDestroy from the data module destructor.


 CLX Reference

TDataModule events

TDataModule	Alphabetically	Legend

In TDataModule

OnCreate

OnDestroy


 CLX Reference

TDataModule events

TDataModule	By object	Legend

OnCreate

OnDestroy


TDataModule.OnCreate
 CLX 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
 CLX 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.


 CLX Reference

TDataModule methods

TDataModule	Alphabetically	Legend

In TDataModule

AfterConstruction

BeforeDestruction

Create

CreateNew

Destroy

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TDataModule.AfterConstruction
 CLX 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
 CLX 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
 CLX 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.


TDataModule.CreateNew
 CLX 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 .xfm 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 .xfm 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 .xfm file. Therefore, you must stream in an external .xfm to bind the visual components with their classes. You can stream in the previously associated .xfm file by calling InitInheritedComponent. To stream in a different .xfm  file, bracket the call to CreateNew with calls to WriteComponentResFile and ReadComponentResFile. The following code sequence

1. streams out an external .xfm  file.

2. creates a new data module disassociated from any .xfm resource file;

3. streams in the external .xfm file and binds it to this new data module.

WriteComponentResFile('Temp.xfm', DataModule1);

…

DataModule2 := TDataModule.CreateNew(Application);

ReadComponentResFile('Temp.xfm', DataModule2);


TDataModule.Destroy
 CLX 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


TDefaultEditor
 CLX 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.


 CLX Reference

TDefaultEditor properties

TDefaultEditor	Alphabetically 	Legend

Derived from TComponentEditor

Component

Designer

Derived from TInterfacedObject

RefCount


 CLX Reference

TDefaultEditor properties

TDefaultEditor	By object 	Legend

Component

Designer

RefCount


 CLX Reference

TDefaultEditor methods

TDefaultEditor	Alphabetically	Legend

In TDefaultEditor

Edit

EditProperty

Derived from TComponentEditor

Copy

Create

ExecuteVerb

GetComponent

GetDesigner

GetVerb

GetVerbCount

IsInInlined

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


 CLX 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

SafeCallException


TDefaultEditor.Edit
 CLX 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
 CLX 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


TDialog
 CLX Reference

TDialog

Hierarchy	Properties	Methods	Events	See also

TDialog is the ancestor of all components that represent dialog boxes.

Unit

QDialogs

Description

TDialog is an abstract class that represents all dialog boxes. TDialog is used as a base class for the two basic types of dialog boxs in CLX, TQtDialog and TCustomDialog. TQtDialog serves as a base class for dialogs that encapsulate the Qt shared library dialog widgets. The TQtDialog descendents handle such tasks as opening and saving files, setting fonts and colors, and printing. The TCustomDialog descendents handle such tasks as searching and replacing text in a file.

The dialogs do not appear at runtime until activated by a call to the Execute method. Except for TFindDialog and TReplaceDialog, all CLX dialogs are modal.


 CLX Reference

TDialog properties

TDialog	Alphabetically	Legend

In TDialog

Height

HelpContext

HelpKeyword

HelpType

Modal

Position

Title

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TDialog properties

TDialog	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Height

HelpContext

HelpKeyword

HelpType

Modal

Name

Owner

Position

Tag

Title

Width


TDialog.Height
 CLX Reference

TDialog.Height

TDialog	See also

Specifies the vertical size of the dialog box.

property Height: Integer;

Description

Use Height to read or change the height of a dialog box.


TDialog.HelpContext
 CLX Reference

TDialog.HelpContext

TDialog	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.


TDialog.HelpKeyword
 CLX Reference

TDialog.HelpKeyword

TDialog	See also

Specifies the keyword used to invoke the help system.

property HelpKeyword: string;

Description

If HelpType is set to htKeyword, the help system will be invoked from the dialog by keyword. Use HelpKeyword to store that keyword.


TDialog.HelpType
 CLX Reference

TDialog.HelpType

TDialog	See also

Specifies the method the dialog uses to invoke the help system.

property HelpType: THelpType;

Description

The value of HelpType determines whether the help system is invoked by keyword (stored in the property HelpKeyword) or context ID (stored in the property HelpContext). See the documentation for THelpType for more information.


TDialog.Modal
 CLX Reference

TDialog.Modal

TDialog	See also

Specifies whether the dialog box is modal or modeless.

property Modal: Boolean;

Description

Use Modal to specify whether the dialog box is modal or modeless. A modeless dialog is a normal window, while a modal window must be finished before the user can continue with other parts of the program. If Modal is set to True the dialog box is modal. Setting the Modal property only has an effect if is set prior to calling the Execute method, which actually creates and displays the dialog box.


TDialog.Position
 CLX Reference

TDialog.Position

TDialog	See also

Determines the position of the dialog on the screen.

property Position: TPoint;

Description

Position gives the pixel coordinates of the dialog’s upper left corner.


TDialog.Title
 CLX Reference

TDialog.Title

TDialog

Specifies the title caption for the dialog box.

property Title: String;

Description

Use Title to return or set the title caption for the dialog box.


TDialog.Width
 CLX Reference

TDialog.Width

TDialog	See also

Specifies the horizontal size of the dialog box.

property Width: Integer;

Description

Use Width to read or change the width of a dialog box.


 CLX Reference

TDialog events

TDialog	Alphabetically	Legend

In TDialog

OnClose

OnShow


 CLX Reference

TDialog events

TDialog	By object	Legend

OnClose

OnShow


TDialog.OnClose
 CLX Reference

TDialog.OnClose

TDialog

Occurs when the dialog closes.

property OnClose: TNotifyEvent;

Description

Write an OnClose event handler to perform special processing when the dialog closes.


TDialog.OnShow
 CLX Reference

TDialog.OnShow

TDialog	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.


 CLX Reference

TDialog methods

TDialog	Alphabetically	Legend

In TDialog

DoClose

DoExecute

DoShow

Execute

GetBounds

SetBounds

SetTitle

Derived from TComponent

BeforeDestruction

Create

Destroy

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


 CLX Reference

TDialog methods

TDialog	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoClose

DoExecute

DoShow

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TDialog.Create
 CLX Reference

TDialog.Create

TDialog	See also

Creates and initializes a TDialog 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.


TDialog.Destroy
 CLX Reference

TDialog.Destroy

TDialog	See also

Destroys the TDialog 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.


TDialog.DoClose
 CLX Reference

TDialog.DoClose

TDialog	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).


TDialog.DoExecute
 CLX Reference

TDialog.DoExecute

TDialog	See also

Does this...

function DoExecute: Boolean; virtual; abstract;

Description

DoExecute is automatically called in the Execute method.


TDialog.DoShow
 CLX Reference

TDialog.DoShow

TDialog	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).


TDialog.EventHandler
 CLX Reference

TDialog.EventHandler

TDialog	See also

Generates an OnClose event.

procedure EventHandler; dynamic;

Description

EventHandler 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 EventHandler rather than writing an OnClose event handler (which can access only public methods).


TDialog.Execute
 CLX Reference

TDialog.Execute

TDialog	See also

Displays the dialog box.

function Execute: Boolean; virtual; abstract;

Description

TDialog 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.


TDialog.GetBounds
 CLX Reference

TDialog.GetBounds

TDialog	See also

Introduces an interface for returning the Position, Width, and Height properties all at once.

function GetBounds: TRect; virtual; abstract;

Description

TDialog introduces the abstract method, GetBounds, to return all of the dialog box's position and size properties at one time. The same effect can be achieved by reading the Position, Width, and Height properties separately, but GetBounds retuurns all three properties at once in a TRect data structure. The decsendent classes, TQtDialog and TCustomDialog, override GetBounds to introduce specific functionality for their type of dailog box.


TDialog.SetBounds
 CLX Reference

TDialog.SetBounds

TDialog	See also

Introduces an interface for setting the Position, Width, and Height properties all at once.

procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); virtual; abstract;

Description

TDialog introduces the abstract method, SetBounds, to change all of the dialog box's position and size properties at one time. The same effect can be achieved by setting the Position, Width, and Height properties separately, but SetBounds changes all three properties at once ensuring that the dialog box will not repaint between changes. The decsendent classes, TQtDialog and TCustomDialog, override SetBounds to introduce specific functionality for their type of dailog box.


TDialog.SetTitle
 CLX Reference

TDialog.SetTitle

TDialog	See also

Set the Value of the Title property.

procedure SetTitle(const Value: string); vitural;

Description

SetTitle is the protected write implementation of the Title property.


Hierarchy

TObject

TPersistent

TComponent

TDialog


TDragControlObject
 CLX Reference

TDragControlObject

Hierarchy	Properties	Methods	See also

TDragControlObject object provides for normal drag and drop operations.

Unit

QControls

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.


 CLX Reference

TDragControlObject Properties

TDragControlObject	Alphabetically	Legend

Derived from TBaseDragControlObject

Control

Derived from TDragObject

DragTargetPos

IsInterAppDrag

KeyState


 CLX Reference

TDragControlObject Properties

TDragControlObject	By Object	Legend

Control

DragTargetPos

IsInterAppDrag

KeyState


 CLX Reference

TDragControlObject Methods

TDragControlObject	Alphabetically	Legend

In TDragControlObject

GetDragImageHotSpot

GetDragImageIndex

HideDragImage

ShowDragImage

Derived from TBaseDragControlObject

Assign

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


 CLX Reference

TDragControlObject Methods

TDragControlObject	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetDragImageHotSpot

GetDragImageIndex

GetInterface

GetInterfaceEntry

GetInterfaceTable

HideDragImage

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

ShowDragImage


TDragControlObject.GetDragImageHotspot
 CLX Reference

TDragControlObject.GetDragImageHotspot

TDragControlObject	See also

Return drag image hotspot.

function GetDragImageHotSpot: TPoint; override;

Description

TDragControlObject overrides GetDragImageHotSpot in order to use the hotspot specified by Control in its own GetDragImageHotSpot method.


TDragControlObject.GetDragImageIndex
 CLX Reference

TDragControlObject.GetDragImageIndex

TDragControlObject	See also

Return drag image index.

function GetDragImageIndex: TDragImageList; virtual;

Description

TDragControlObject overrides GetDragImageIndex in order to use the drag image specified by Control in its own GetDragImageIndex method.


TDragControlObject.HideDragImage
 CLX 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
 CLX 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


TDesignerSelections
 CLX 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.


 CLX Reference

TDesignerSelections properties

TDesignerSelections	Alphabetically	Legend

In TDesignerSelections

Count

Items

Derived from TInterfacedObject

RefCount


 CLX Reference

TDesignerSelections properties

TDesignerSelections	By object	Legend

Count

Items

RefCount


TDesignerSelections.Count
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


EAbort
 CLX 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.


 CLX Reference

EAbort properties

EAbort	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EAbort properties

EAbort	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX 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.


 CLX Reference

EAbstractError properties

EAbstractError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EAbstractError properties

EAbstractError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


 CLX Reference


EAssertionFailed
 CLX 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.


 CLX Reference

EAssertionFailed properties

EAssertionFailed	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EAssertionFailed properties

EAssertionFailed	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EBitsError
 CLX 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.


 CLX Reference

EBitsError properties

EBitsError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EBitsError properties

EBitsError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX 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.


 CLX Reference

EClassNotFound properties

EClassNotFound	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EClassNotFound properties

EClassNotFound	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX 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

  LF = #10;

var

  TempDate: TDateTime;

begin

  try

    TempDate := StrToDateTime('99/99/1998');

  except

    on E: EConvertError do

      ShowMessage(E.ClassName + LF + E.Message);

end;


 CLX Reference

EConvertError properties

EConvertError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EConvertError properties

EConvertError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EComponentError
 CLX 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.

To register a component, write a procedure called “Register”, declared in the interface section of the component’s unit file. 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.


 CLX Reference

EComponentError properties

EComponentError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EComponentError properties

EComponentError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


TEdit
 CLX Reference

 TEdit

Hierarchy	Properties	Methods	Events	Using TEdit	See also

TEdit is a wrapper for a  single-line edit control.

Unit

QStdCtrls

Description

Use a TEdit object to put a standard 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.


 CLX Reference

TEdit properties

TEdit	Alphabetically	Legend

Derived from TCustomEdit

Alignment

AutoSelect

AutoSize

BorderStyle

CharCase

EchoMode

Handle

HideSelection

MaxLength

Modified

ReadOnly

SelLength

SelStart

SelText

Text

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TEdit Properties

TEdit	By Object	Legend

Action

Align

Alignment

Anchors

AutoSelect

AutoSize

BorderStyle

BoundsRect

Brush

CharCase

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

EchoMode

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

HideSelection

Hint

Left

MaxLength

Modified

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ReadOnly

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

Text

Top

Visible

Width


 CLX Reference

TEdit events

TEdit	Alphabetically	Legend

Derived from TCustomEdit

OnChange

OnReturnPressed

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TEdit Events

TEdit	By Object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnReturnPressed

OnStartDrag


 CLX Reference

TEdit methods

TEdit	Alphabetically	Legend

Derived from TCustomEdit

Clear

ClearSelection

CopyToClipboard

Create

CutToClipboard

GetSelTextBuf

PasteFromClipboard

SelectAll

SetSelTextBuf

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

Destroy

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TEdit Methods

TEdit	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

PasteFromClipboard

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSelTextBuf

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomEdit

TEdit


TEditAction
 CLX 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

QStdActns

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.


 CLX Reference

TEditAction properties

TEditAction	Alphabetically	Legend

In TEditAction

EditControl

MemoControl

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TEditAction properties

TEditAction	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

EditControl

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

MemoControl

Name

Owner

ShortCut

Tag

Visible


TEditActionEditControl
 CLX Reference

TEditAction.EditControl

TEditAction 	See also

Provides access to the target of the action.

property EditControl: TCustomEdit;

Description

EditControl is the edit control on which the action performs its function. Set the value of EditControl to limit the action so that it only operates on a specific edit control. If EditControl is unassigned, the action dynamically locates the target edit control when it executes.

If the target of the action is a memo control rather than an edit control, then the EditControl property is nil and the target is specified by the MemoControl property.


TEditActionMemoControl
 CLX Reference

TEditAction.MemoControl

TEditAction 	See also

Provides access to the target of the action.

property MemoControl: TCustomMemo;

Description

MemoControl is the memo control on which the action performs its function. Set the value of MemoControl to limit the action so that it only operates on a specific memo control. If MemoControl is unassigned, the action dynamically locates the target memo control when it executes.

If the target of the action is an edit control rather than a memo control, then the MemoControl property is nil and the target is specified by the EditControl property.


 CLX Reference

TEditAction events

TEditAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TEditAction events

TEditAction	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX Reference

TEditAction methods

TEditAction	Alphabetically	Legend

In TEditAction

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

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


 CLX 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

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


TEditAction.HandlesTarget
 CLX 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 EditControl property is set if Target is nil). HandlesTarget returns True if there is an edit control to act as target, False otherwise.


TEditAction.UpdateTarget
 CLX 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
 CLX Reference

TEditCopy

Hierarchy	Properties	Methods	Events	Using TEditCopy	See also

TEditCopy copys the selected text in a target edit control to the clipboard.

Unit

QStdActns

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.


 CLX Reference

TEditCopy properties

TEditCopy	Alphabetically	Legend

Derived from TEditAction

EditControl

MemoControl

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TEditCopy properties

TEditCopy	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

EditControl

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

MemoControl

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TEditCopy events

TEditCopy	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TEditCopy events

TEditCopy	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX Reference

TEditCopy.ExecuteTarget

TEditCopy 	See also

Copies selected text in the target control to the 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


TEditDelete
 CLX Reference

TEditDelete

Hierarchy	Properties	Methods	Events	Using TEditDelete	See also

TEditDelete deletes the selected text in a target edit control.

Unit

QStdActns

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.


 CLX Reference

TEditDelete properties

TEditDelete	Alphabetically	Legend

Derived from TEditAction

EditControl

MemoControl

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TEditDelete properties

TEditDelete	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

EditControl

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

MemoControl

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TEditDelete events

TEditDelete	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TEditDelete events

TEditDelete	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX Reference

TEditDelete methods

TEditDelete	Alphabetically	Legend

In TEditDelete

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

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


 CLX 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

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
 CLX 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 Clear method, deleting the selected text.


TEditDelete.UpdateTarget
 CLX 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
 CLX Reference

TEditPaste

Hierarchy	Properties	Methods	Events	Using TEditPaste	See also

TEditPaste pastes text from the clipboard into the active edit control.

Unit

QStdActns

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.


 CLX Reference

TEditPaste properties

TEditPaste	Alphabetically	Legend

Derived from TEditAction

EditControl

MemoControl

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TEditPaste properties

TEditPaste	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

EditControl

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

MemoControl

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TEditPaste events

TEditPaste	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TEditPaste events

TEditPaste	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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
 CLX Reference

TEditSelectAll

Hierarchy	Properties	Methods	Events	Using TEditSelectAll	See also

TEditSelectAll selects all text in an active text control.

Unit

QStdActns

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.


 CLX Reference

TEditSelectAll properties

TEditSelectAll	Alphabetically	Legend

Derived from TEditAction

EditControl

MemoControl

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TEditSelectAll properties

TEditSelectAll	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

EditControl

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

MemoControl

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TEditSelectAll events

TEditSelectAll	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TEditSelectAll events

TEditSelectAll	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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


EDivByZero
 CLX 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.


 CLX Reference

EDivByZero properties

EDivByZero	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EDivByZero properties

EDivByZero	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EExternalException
 CLX 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 (only under Windows, and only when the OS generates one) in its ExceptionRecord data structure.


 CLX Reference

EExternalException properties

EExternalException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EExternalException properties

EExternalException	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX Reference

EExternal

Hierarchy	Properties	Methods	See also

EExternal is the exception class that captures external error information.

Unit

SysUtils

Description

EExternal is the ancestor of all exception classes that represent external run time errors.

Under Windows, EExternal classes represent Win32 exception codes. EExternal's  ExceptionRecord member points to a Win32 exception record:

type

PExceptionRecord = ^TExceptionRecord;

TExceptionRecord = record

  ExceptionCode: Cardinal;

  ExceptionFlags: Cardinal;

  ExceptionRecord: PExceptionRecord;

  ExceptionAddress: Pointer;

  NumberParameters: Cardinal;

  ExceptionInformation: array[0..14] of Cardinal;

end;

ExceptionRecord: PExceptionRecord;

Under Linux, EExternal classes represent various runtime errors. EExternal has three fields with exception information:

ExceptionAddress, which contains the address of the instruction that caused the error;

AccessAddress, the address that was being accessed when the error occurred;

SignalNumber, for exceptions raised by Linux signals.


 CLX Reference

EExternal properties

EExternal	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EExternal properties

EExternal	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EHeapException
 CLX 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.


 CLX Reference

EHeapException properties

EHeapException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EHeapException properties

EHeapException	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX 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


EHandleComponentException
 CLX Reference

EHandleComponentException

Hierarchy	Properties	Methods	See also

EHandleComponentException is the exception class for errors that occur when working with THandleComponent objects.

Unit

QTypes

Description

THandleComponent raises an EHandleComponentException when it is unable to obtain a handle for the underlying widget.


 CLX Reference

EHandleComponentException properties

EHandleComponentException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EHandleComponentException properties

EHandleComponentException	By object	Legend

HelpContext

Message


 CLX Reference

EHandleComponentException methods

EHandleComponentException	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


 CLX Reference

EHandleComponentException methods

EHandleComponentException	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

EHandleComponentException


EIntfCastError
 CLX 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.


 CLX Reference

EIntfCastError properties

EIntfCastError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EIntfCastError properties

EIntfCastError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EInOutError
 CLX 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 (native OS errors) and 100-149 (CLX errors).

Error codes in the range 0-99 represent OS error conditions, which are different for Windows and Linux. The SysErrorMessage function returns descriptive text for these errors.

Here are some common OS I/O errors, arranged by rough equivalents in Linux and Windows:

Linux	Windows
Error Code	Description	Error Code	Description
2	No such file or directory	2	File not found
		3	Path not found
5	I/O Error
13	Permission denied	5	Access denied
20	Not a directory
21	Is a directory
		32	Sharing violation
Error codes in the range 100 to 149 represent platform-independent error conditions raised by CLX. Here are the CLX 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.


 CLX Reference

EInOutError properties

EInOutError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EInOutError properties

EInOutError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EIntError
 CLX 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.


 CLX Reference

EIntError properties

EIntError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EIntError properties

EIntError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EInvalidCast
 CLX 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


 CLX Reference

EInvalidCast properties

EInvalidCast	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EInvalidCast properties

EInvalidCast	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX Reference

EInvalidGridOperation

Hierarchy	Properties	Methods	See also

EInvalidGridOperation is the exception class for illegal grid operations.

Unit

QGrids

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.


 CLX Reference

EInvalidGridOperation properties

EInvalidGridOperation	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EInvalidGridOperation properties

EInvalidGridOperation	By object	Legend

Message

HelpContext


 CLX 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


 CLX 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


EInvalidGraphic
 CLX Reference

EInvalidGraphic

Hierarchy	Properties	Methods

EInvalidGraphic is the exception class for unrecognized graphic files.

Unit

QGraphics

Description

EInvalidGraphic is raised when

An application attempts to load a file that is not a valid bitmap, drawing, 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.

An application attempts to set the PixelFormat of an image to an unsupported value.


 CLX Reference

EInvalidGraphic properties

EInvalidGraphic	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EInvalidGraphic properties

EInvalidGraphic	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EInvalidHandleException
 CLX Reference

EInvalidHandleException

Hierarchy	Properties	Methods	See also

EInvalidHandleException is the exception class for illegal operations involving handles with TFont, TPen, or TBrush objects.

Unit

QGraphics

Description

EInvalidHandleException is raised when an application attempts to assign a null or invalid handle to the Handle property of a TFont, TPen, or TBrush.


 CLX Reference

EInvalidHandleException Properties

EInvalidHandleException	By Object	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EInvalidHandleException Properties

EInvalidHandleException	By Object	Legend

HelpContext

Message


 CLX Reference

EInvalidHandleException Methods

EInvalidHandleException	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


 CLX Reference

EInvalidHandleException Methods

EInvalidHandleException	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

EInvalidHandleException


EInvalidArgument
 CLX 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.


 CLX Reference

EInvalidArgument properties

EInvalidArgument	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EInvalidArgument properties

EInvalidArgument	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EListError
 CLX 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.


 CLX Reference

EListError properties

EListError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EListError properties

EListError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EListViewException
 CLX Reference

EListViewException

Hierarchy	Properties	Methods

EListViewException is the exception class for list views.

Unit

QControls

Description

EListViewException is raised when an error occurs in list views.


 CLX Reference

EListViewException Properties

EListViewException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EListViewException Properties

EListViewException	By Object	Legend

HelpContext

Message


 CLX Reference

EListViewException Methods

EListViewException	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


 CLX Reference

EListViewException Methods

EListViewException	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

EListViewException


EMaskException
 CLX 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.


 CLX Reference

EMaskException properties

EMaskException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EMaskException properties

EMaskException	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EMathError
 CLX 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.


 CLX Reference

EMathError properties

EMathError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EMathError properties

EMathError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EOutOfResources
 CLX Reference

EOutOfResources

Hierarchy	Properties	Methods	See also

EOutOfResources is the exception class for unsuccessful attempts to allocate windowhandles.

Unit

Classes

Description

EOutOfResources is raised when an application attempts to create a window handle and there are no more handles to allocate.


 CLX Reference

EOutOfResources properties

EOutOfResources	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EOutOfResources properties

EOutOfResources	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX 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.


 CLX Reference

EOverflow properties

EOverflow	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EOverflow properties

EOverflow	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX 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.


 CLX Reference

EParserError properties

EParserError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EParserError properties

EParserError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


ERangeError
 CLX 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.

Do not confuse ERangeError with ERangeException, which relates to errors using graduated controls.


 CLX Reference

ERangeError properties

ERangeError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

ERangeError properties

ERangeError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX 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.


 CLX Reference

EReadError properties

EReadError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EReadError properties

EReadError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EStatusBarException
 CLX Reference

EStatusBarException

Hierarchy	Properties	Methods

EStatusBarException is the exception class for status bar errors.

Unit

QControls

Description

EStatusBarException is the exception class for errors that occur when using a status bar.


 CLX Reference

EStatusBarException Properties

EStatusBarException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EStatusBarException Properties

EStatusBarException	By Object	Legend

HelpContext

Message


 CLX Reference

EStatusBarException Methods

EStatusBarException	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


 CLX Reference

EStatusBarException Methods

EStatusBarException	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

EStatusBarException


EStackOverflow
 CLX 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.


 CLX Reference

EStackOverflow properties

EStackOverflow	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EStackOverflow properties

EStackOverflow	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EStreamError
 CLX 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.


 CLX Reference

EStreamError properties

EStreamError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EStreamError properties

EStreamError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EUnderflow
 CLX 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.


 CLX Reference

EUnderflow properties

EUnderflow	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EUnderflow properties

EUnderflow	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


 CLX Reference


EVariantError
 CLX 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.

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.


 CLX Reference

EVariantError properties

EVariantError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EVariantError properties

EVariantError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EWidgetControlException
 CLX Reference

EWidgetControlException

Hierarchy	Properties	Methods	See also

EWidgetControlException is the exception class for controls that wrap Qt widgets.

Unit

QDialogs

Description

EWidgetControlException is raised when a TWidgetControl descendant fails to create the underlying widget that implements the control.


 CLX Reference

EWidgetControlException Properties

EWidgetControlException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EWidgetControlException Properties

EWidgetControlException	By Object	Legend

HelpContext

Message


 CLX Reference

EWidgetControlException Methods

EWidgetControlException	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


 CLX Reference

EWidgetControlException Methods

EWidgetControlException	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

EWidgetControlException


OnCustomDrawItem example
 CLX Reference

OnCustomDrawItem

The following event handler draws each item caption centered in an ellipse.

procedure TForm1.TreeView1CustomDrawItem(Sender: TCustomViewControl;

  Item: TCustomViewItem; Canvas: TCanvas; const Rect: TRect;

  State: TCustomDrawState; Stage: TCustomDrawStage;

  var DefaultDraw: Boolean);

  var Offset: Integer;

begin

  with TTreeNode(Item) dobegin

    Offset := (Rect.Right - Rect.Left - Canvas.TextWidth(Text)) div 2;

    Canvas.Ellipse(Rect);

    Canvas.TextOut(Offset, 0, Text);

  end;

  DefaultDraw := False; //item already complete

end;


OnTimer, Interval, ActiveControl, Left example
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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;


Arc example
 CLX 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;


Assign example
 CLX Reference

Assign Example

The following line copies the bitmap of a speed button named SpeedButton1 to the Clipboard.  Note that you must addQClipbrd to the uses clause

Clipboard.Assign(SpeedButton1.Glyph);


AutoSize Example
 CLX 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
 CLX 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;


BeginUpdate, EndUpdate, Add, Count, Items Example
 CLX 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
 CLX 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
 CLX 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.png');

    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
 CLX 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
 CLX 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
 CLX 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;


Canvas, Ellipse, Color, Style Example
 CLX 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;


Chord example
 CLX 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
 CLX 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
 CLX 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

TWidgetControl

TControl

TComponent

TPersistent

TObject


ClientHeight example
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

CountrolCount, Controls, Top Example

This example uses a scrollbar and a group box on a form, with several controls contained within the group box. When the scrollbar is clicked, the controls within the group box are moved in the appropriate direction.

procedure TForm1.ScrollBar1Scroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer);

var

  I: Integer;

  ChildControl: TControl;

begin

  for I:= 0 to GroupBox1.ControlCount -1 do

  begin

    ChildControl := GroupBox1.Controls[I];

    ChildControl.Top := ChildControl.Tag + ScrollPos;

  end;

end;


CopyFrom, ExeName, ExtractFilePath, Format Example
 CLX 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, mtCustom, 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;


Items, Delete Example
 CLX 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);

begin

if (CheckBox1.Checked) and (Sender is TTreeView) then

  begin

  with Sender as TTreeView do

    begin

      Items.Delete(GetNodeAt(X,Y));

    end;

  end;

end;


Empty Example
 CLX 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.png');


FilterIndex, Files, Strings, Append Example
 CLX 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
 CLX 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;


SetFocus, SelStart, SelLength Example
 CLX 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
 CLX 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 normal foreground color.

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 *.xfm}

procedure TForm1.ColorControl(Sender: TObject);

var

  I : Integer;

  ControlColor: TColor;

begin

  for I:= 0 to ControlCount -1 do

  begin

    ControlColor :=clNormalForeground;

    if Controls[I] is TWidgetControl then

      if (Controls[I] as TWidgetControl).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
 CLX Reference

OnDropDown, Sorted, Clear, BeginUpdate, EndUpdate Example

This example fills the list of a combo box with the set of open forms when the user drops down the list.  The list is regenerated every time the list is dropped down, so if the application opens or closes forms, the combo box stays current.

procedure Form1.ComboBox1DropDown(Sender: TObject);

var

  I: Integer;

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 form names are sorted }

    for I := 0 to Screen.CustomFormCount – 1 do

    begin

      Items.Add(Screen.CustomForms[I].Caption); { add form name }

    end;

    Items.EndUpdate; {reenable painting }

  end;

end;


MenuItem, FormCount, Forms Example
 CLX 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
 CLX 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 Example
 CLX Reference

Rect, TextRect Example

The following code displays the text “Hello, world!” in a rectangle defined by the coordinates (10, 10) and (100, 100).

var

TheRect: TRect;

begin

  TheRect := Rect(10,10,100,100);

  Form1.Canvas.TextRect(TheRect,10,10,'Hello, world!');

end;


GetComponent, SetComponent Example
 CLX 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

usesQClipbrd;

{$R *.xfm}

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
 CLX 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;


GetSelTextBuf, SelText Example
 CLX 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;


Glyph, NumGlyphs Example
 CLX 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
 CLX Reference

Graphic Example

The following code draws the graphic in Picture1 in the top-left corner PaintBox1.

PaintBox1.Canvas.Draw(0,0, Picture1.Graphic);


OnIdle, HandleMessage Example
 CLX 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;


HelpCommand Example
 CLX 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;

Note:	HelpCommand assumes that you are using HyperHelp when writing Linux applications.


HelpContext Example
 CLX 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;

Note:	HelpContext assumes that you are using HyperHelp when writing Linux applications.


HelpFile, HelpJump Example
 CLX 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 "clx.hlp" with the full name of the CLX Help file that accompanies this product.)

procedure TForm1.BitBtn1Click(Sender: TObject);

begin

  Application.HelpFile := 'clx.hlp';

  Application.HelpJump('TApplication_HelpJump');

end;

Note:	This example assumes that you are using HyperHelp when writing Linux applications.


Hide Example
 CLX 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
 CLX 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
 CLX 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;


IndexOf Example
 CLX 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);


IndexOfName, Count, Names, Strings Example
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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;


MoveTo, LineTo Example
 CLX 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
 CLX 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;


NewMenu, NewItem, TextToShortCut, Menu example
 CLX 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;


ModalResult, ShowModal Example
 CLX 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;


MouseToCell Example
 CLX 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
 CLX 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;


NormalizeTopMosts, RestoreTopMosts, MessageBox Example
 CLX 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', [smbOK]);

    RestoreTopMosts;

  end;

end;


OnActivate, ComponentCount, Components Example
 CLX 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
 CLX 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 *.xfm}

uses Unit2;

procedure TForm1.ColorForm(Sender: TObject);

begin

  Color := clWhite;

  Form2.Color := clWhite;

  Screen.ActiveForm.Color := clAqua;

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

  Screen.OnActiveFormChange := ColorForm;

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  Form2.Show;

end;


OnDeactivate, Minimize Example
 CLX 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
 CLX 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
 CLX 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
 CLX 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 := clNormalBackGround;

    Canvas.FillRect(Rect);

    ImageList1.Draw(Canvas,Rect.Left,Rect.Top,index);

    if gdFocused in State then

      Canvas.DrawFocusRect(Rect);

  end;

end;


OnEndDrag Example
 CLX 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
 CLX 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 white.

procedure TForm1.Edit1Enter(Sender: TObject);

begin

  Edit1.Color := clYellow;

end;

procedure TForm1.Edit1Exit(Sender: TObject);

begin

  Edit1.Color := clWhite;

end;

procedure TForm1.Memo1Enter(Sender: TObject);

begin

  Memo1.Color := clYellow;

end;

procedure TForm1.Memo1Exit(Sender: TObject);

begin

  Memo1.Color := clWhite;

end;


OnException, ShowException, Terminate Example
 CLX 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;


OnGetEditMask Example
 CLX 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
 CLX 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
 CLX Reference

OnHelp Example

The following code changes the Help file depending on the active form, before HyperHelp 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
 CLX 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 *.xfm}

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 *.xfm}

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
 CLX 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;


OnPopup Example
 CLX Reference

OnPopup Example

The following code enables the Copy item from the pop-up menu if the edit control has a nonempty selection.

procedure TForm1.PopupMenu1Popup(Sender: TObject);

begin

  Copy1.Enabled := Edit1.SelLength > 0;

end;


Options Example
 CLX 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
 CLX 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
 CLX 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;


OnRowMoved Example
 CLX 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
 CLX 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;


OnSelectCell Example
 CLX 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
 CLX 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 *.xfm}

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.


Pack Example
 CLX 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;


Parent, GetNextChild, GetPrevChild Example
 CLX 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;


OnPaint, Pen, Polyline Example
 CLX 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
 CLX 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
 CLX Reference

PopupComponent, PopupMenu Example

This example uses two edit boxes, 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:

procedure TForm1.FormCreate(Sender: TObject);

begin

  PopupMenu1.AutoPopup := True;

  Edit1.PopupMenu := PopupMenu1;

  Edit2.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

    Beep;

end;

procedure TForm1.Cut1Click(Sender: TObject);

begin

  if PopupMenu1.PopupComponent = Edit1 then

    Edit1.CutToClipboard

  elseif PopupMenu1.PopupComponent = Edit2 then

    Edit2.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

    Beep;

end;


ProcessMessages Example
 CLX 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
 CLX 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('\usr\myapp.ini');

  with MyIniFile do

  begin

    if ReadBool('AutoLoad', 'FormProperties', False) = True then

    begin

      Visible := ReadBool('FormOptions', 'Visible', True);

      Color := TColor(ReadInteger('FormOptions', 'Color', clNormalBackground));

      Caption := ReadString('FormOptions', 'Caption', 'Main');

  end;

  MyIniFile.Free;

end;


Create, ReadSectionValues, WriteString, DeleteKey Example
 CLX 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('\usr\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('\usr\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
 CLX 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
 CLX 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
 CLX 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;


RoundRect, Width Example
 CLX 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
 CLX 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;


Sort example
 CLX 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
 CLX 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
 CLX 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;


WriteBool, WriteInteger Example
 CLX 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
 CLX Reference

Toolbar example

To create a 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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;


Exception
 CLX 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.


 CLX Reference

Exception properties

Exception	Alphabetically	Legend

In Exception

HelpContext

Message


 CLX Reference

Exception properties

Exception	By object	Legend

HelpContext

Message


Exception.HelpContext
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX Reference

Exception.Create

Exception	See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

Ident is the unique ID of the resource. 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
 CLX 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.

Ident is the unique ID of the resource. 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
 CLX 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. Ident is the unique ID of the resource. 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
 CLX 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.

Ident is the unique ID of the resource. 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
 CLX 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.


 CLX Reference

EZeroDivide properties

EZeroDivide	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EZeroDivide properties

EZeroDivide	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


 CLX Reference


TFontRecall
 CLX Reference

TFontRecall

Hierarchy	Properties	Methods	See also

TFontRecall saves and restores the properties of a TFont object.

Unit

QGraphics

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.


 CLX Reference

TFontRecall properties

TFontRecall	Alphabetically	Legend

Derived from TRecall

Reference


 CLX Reference

TFontRecall properties

TFontRecall	By object	Legend

Reference


 CLX 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


 CLX 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
 CLX 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
 CLX Reference

TFont

Hierarchy	Properties	Methods	Events	See also

TFont encapsulates a system font.

Unit

QGraphics

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 QT QFont object.


 CLX Reference

TFont properties

TFont	Alphabetically	Legend

In TFont

Charset

Color

Handle

FontPen

Height

Name

Pitch

PixelsPerInch

Size

Style

Weight


 CLX Reference

TFont properties

TFont	By object	Legend

Charset

Color

FontPen

Handle

Height

Name

Pitch

PixelsPerInch

Size

Style

Weight


TFont.Charset
 CLX 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.Color
 CLX 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.FontPen
 CLX Reference

TFont.FontPen

TFont	See also 	Example

Returns a unique 4-byte identifier that represents the instance of the QPen used by the font object to render text.

property FontPen: QPenH;

Description

Use FontPen to return the instance pointer to the QPen object used by the font object to render the text on a canvas.


TFont.Handle
 CLX Reference

TFont.Handle

TFont	See also

Returns a unique 4-byte identifier that represents the instance of a QT QFont object.

property Handle: QFontH;

Description

Use Handle to return a typed pointer to the instance of the underlying QFont object. This Handle can be used when making low-level function calls into the QT shared libraries, where the function call requires an instance pointer to a QFont object.

Set Handle to make the TFont object represent the QFont object indicated by the font handle. Setting Handle releases the current QFont object. If the handle to the QFont object was owned by the TFont object, the QFont object is destroyed. Setting Handle does not automatically assume ownership of the QFont object. To assume ownership, call OwnHandle after setting the Handle.

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

Warning:	If the Weight property is not set to either fwNormal or fwBold, setting the Style property to fsBold has no effect and is ignored.


TFont.Weight
 CLX Reference

TFont.Weight

TFont	See also

Determines the weight (or boldness) of a font.

const

  fwLight = 25;

  fwNormal = 50;

  fwDemiBold = 63;

  fwBold = 75;

  fwBlack = 87;

property Weight: Integer;

__property TFontStyles Style = {read=GetStyle, write=SetStyle, nodefault};

Description

Use Weight to read or set the weight (boldness) of the font. Weight can be one of the following constants:

Constant	Value	Meaning

fwLight	25	The font is light.

fwNormal	50	The font is normal.

fwDemiBold	63	The font is demibold.

fwBold	75	The font is bold.

fwBlack	87	The font is black

Note: If the specified weight is not available the closest available will be used. Setting Weight to a value other than fwNormal or fwBold, causes the font style, fsBold, to be  ignored in the Style property.


 CLX Reference

TFont events

TFont	Alphabetically	Legend

Derived from TGraphicsObject

OnChange


 CLX Reference

TFont events

TFont	By object	Legend

OnChange


 CLX Reference

TFont methods

TFont	Alphabetically	Legend

In TFont

Assign

Create

Destroy

OwnHandle

ReleaseHandle

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


 CLX 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

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

OwnHandle

ReleaseHandle

SafeCallException


TFont.Assign
 CLX Reference

TFont.Assign

TFont	See also

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
 CLX Reference

TFont.Create

TFont	See also

Creates and initializes an instance of TFont.

constructor Create; overload;

constructor Create(AHandle: QFontH); overload;

Description

Call Create to create a font object at runtime.

Create allocates memory for the QFont object, and initializes the TFont object to the Application's default font.

Call the second form of the constructor to create a TFont object, based on a QFont object, identified by the AHandle parameter, at runtime. The AHandle parameter must be a QFontH handle that points to a valid QFont object. Ownership of the handle is not automatically assumed. To assume ownership of the handle, call the OwnHandle method.


TFont.Destroy
 CLX 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.If the instance of TFont was created using the Create method, Destroy frees the underlying QFont object identified by the Handle property.

If the instance of TFont was created using the Create(AHandle) method Destroy frees the underlying QFont object identified by the Handle property only if the OwnHandle method was called.


TFont.OwnHandle
 CLX Reference

TFont.OwnHandle

TFont	See also

Cause TFont to assume ownership of the underlying QFont object.

procedure OwnHandle;

Description

Call OwnHandle to assume ownership of the underlying QFont object instance. Use it when you need to accept ownership (or destroy) of the QFont handle.


TFont.ReleaseHandle
 CLX Reference

TFont.ReleaseHandle

TFont	See also

Returns the handle to the underlying QFont object so that the TFont object no longer knows about the handle.

function ReleaseHandle: QFontH;

Description

Use ReleaseHandle to disassociate TFont from the QFont handle. Use it when you need to give a QFont handle to a routine or object that will assume ownership (or destroy) the QFont handle. Calling ReleaseHandle on a handle you do not own does not destroy the handle being released.


Hierarchy

TObject

TPersistent

TGraphicsObject

TFont


TFontDialog
 CLX Reference

 TFontDialog

Hierarchy	Properties	Methods

TFontDialog displays a font-selection dialog.

Unit

QDialogs

Description

TFontDialog displays a modal  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.


 CLX Reference

TFontDialog properties

TFontDialog	Alphabetically	Legend

In TFontDialog

Font

In TQtDialog

Handle

NativeFlags

UseNativeDialog

Derived from TDialog

Height

HelpContext

HelpKeyword

HelpType

Position

Width

Derived from THandleComponent

Hooks

ParentWidget

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TFontDialog properties

TFontDialog	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Name

NativeFlags

Owner

Position

Tag

UseNativeDialog

Width


TFontDialog.Font
 CLX Reference

TFontDialog.Font

TFontDialog	See also

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


 CLX Reference

TFontDialog methods

TFontDialog	Alphabetically	Legend

In TFontDialog

Create

Destroy

Derived from TQtDialog

Execute

HandleAllocated

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

GetParentComponent

HasParent

InsertComponent

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

SafeCallException


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

HandleAllocated

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TFontDialog.Create
 CLX 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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TDialog

TQtDialog

TFontDialog


TForm
 CLX Reference

TForm

Hierarchy 	Properties	Methods	Events	Using TForm	See also

TForm represents a standard application window (form).

Unit

QForms

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.

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.


 CLX Reference

TForm properties

TForm	Alphabetically	Legend

Derived from TCustomForm

Active

ActiveControl

ActiveMDIChild

BorderIcons

BorderStyle

Canvas

ClientHandle

ClientHeight

ClientRect

ClientWidth

DesignerHook

DropTarget

FocusedControl

FormState

FormStyle

Icon

KeyPreview

MDIChildCount

MDIChildren

Menu

ModalResult

Parent

PixelsPerInch

Position

Scaled

Visible

WindowState

Derived from TScrollingWidget

AutoScroll

ChildHandle

HorzScrollBar

VertScrollBar

Derived from TWidgetControl

Bitmap

Brush

ClientOrigin

ControlCount

Controls

Handle

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

Caption

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Enabled

Font

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

Left

Name

ParentFont

PopupMenu

ShowHint

Top

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TForm properties

TForm	By object	Legend

Action

Active

ActiveControl

ActiveMDIChild

Align

Anchors

AutoScroll

Bitmap

BorderIcons

BorderStyle

BoundsRect

Brush

Canvas

Caption

ChildHandle

ClientHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignerHook

DesignInfo

DragMode

DropTarget

Enabled

FocusedControl

Font

FormState

FormStyle

Handle

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

HorzScrollBar

Icon

KeyPreview

Left

MDIChildCount

MDIChildren

Menu

ModalResult

Name

Owner

Parent

ParentFont

ParentWidget

PixelsPerInch

PopupMenu

Position

Scaled

ShowHint

Showing

TabOrder

TabStop

Tag

Top

VertScrollBar

Visible

Width

WindowState


 CLX Reference

TForm events

TForm	By object	Legend

OnActivate

OnClick

OnClose

OnCloseQuery

OnContextPopup

OnCreate

OnDblClick

OnDeactivate

OnDestroy

OnDragDrop

OnDragOver

OnHelp

OnHide

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnLoaded

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnPaint

OnResize

OnShortCut

OnShow


 CLX Reference

TForm methods

TForm	Alphabetically	Legend

In TForm

Cascade

Next

Previous

Tile

Derived from TCustomForm

AfterConstruction

BeforeDestruction

Close

CloseQuery

Create

CreateNew

DefocusControl

Destroy

FocusControl

Hide

InvokeHelp

IsShortCut

Release

SetFocus

SetFocusedControl

Show

ShowModal

Derived from TScrollingWidget

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

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


 CLX Reference

TForm methods

TForm	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Cascade

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Close

CloseQuery

ContainsControl

ContentsRect

ControlAtPos

Create

CreateNew

CreateParented

CreateParentedControl

DefaultHandler

DefocusControl

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

DragDrop

Dragging

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

FocusControl

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

IsShortCut

MethodAddress

MethodName

NewInstance

Next

ParentToClient

Previous

Realign

ReferenceInterface

Refresh

Release

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendToBack

SetBounds

SetFocus

SetFocusedControl

SetSubComponent

Show

ShowModal

Tile

Update

UpdateAction

UpdateControlState


TForm.Cascade
 CLX Reference

TForm.Cascade

TForm	See also

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
 CLX 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
 CLX 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
 CLX Reference

TForm.Tile

TForm	See also

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

TWidgetControl

TFrameControl

TScrollingWidgetControl

TCustomForm

TForm


TFrameControl
 CLX Reference

TFrameControl

Hierarchy	Properties	Methods	See also

TFrameControl is the base class for all windowed controls that need a frame.

Unit

QControls

Description

Use TFrameControl as a base class for controls that allow a wide variety of border styles. Most controls allow a choice of a single-line border or no border. TFrameControl, however, offers its descendants a wider variety of border styles, including various 3-D effects. TFrameControl introduces a number of properties for configuring the border.

Do not create instances of TFrameControl. It is intended only as a base class. Instead, use instances of TFrameControl descendants such as TListView, TTreeView, and TIconView.


 CLX Reference

TFrameControl properties

TFrameControl	Alphabetically	Legend

In TFrameControl

BorderStyle

ClientOrigin

FrameRect

Handle

LineWidth

Margin

MidLineWidth

Derived from TWidgetControl

Brush

ChildHandle

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TFrameControl properties

TFrameControl	By object	Legend

Action

Align

Anchors

BorderStyle

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

FrameRect

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

LineWidth

Margin

MidLineWidth

Name

Owner

Parent

ParentWidget

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width


TFrameControl.BorderStyle
 CLX Reference

TFrameControl.BorderStyle

TFrameControl	See also

Determines the style of the frame drawn around the perimeter of the control.

property BorderStyle: TBorderStyle;

Description

Use BorderStyle to specify the type of frame that appears around the control.


TFrameControl.ClientOrigin
 CLX Reference

TFrameControl.ClientOrigin

TFrameControl	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.


TFrameControl.FrameRect
 CLX Reference

TFrameControl.FrameRect

TFrameControl	See also

Specifies the outer boundary of the frame, or border.

property FrameRect: TRect;

Description

Use FrameRect to specify the outer boundary of the frame. By default, this is the same as the boundary of the widget control itself.


TFrameControl.Handle
 CLX Reference

TFrameControl.Handle

TFrameControl	See also

Returns an identifier that represents the instance of the underlying Qt frame widget.

property Handle: QFrameH;

Description

Use Handle to return a 4-byte identifier to the instance of the underlying frame object. This Handle can be used when making low-level function calls into the Qt shared libraries.


TFrameControl.LineWidth
 CLX Reference

TFrameControl.LineWidth

TFrameControl	See also

Specifies the width of the lines that make up the border.

property LineWidth: Integer;

Description

Use LineWidth to specify the width of the lines used to draw the control’s border.

Note that the border may take up more space than LineWidth, depending on the value of BorderStyle. For example, when BorderStyle is bsNone, the border has no width even if LineWidth is greater than zero, while when BorderStyle is bsDouble, the border contains two lines, each of width LineWidth, plus a space between those lines of width MidLineWidth.


TFrameControl.Margin
 CLX Reference

TFrameControl.Margin

TFrameControl	See also

Specifies the distance between the client area of the control and the innermost pixel of the border.

property Margin: Integer;

Description

Use Margin to specify the distance between the control’s drawn border and the client area of the control.


TFrameControl.MidLineWidth
 CLX Reference

TFrameControl.MidLineWidth

TFrameControl	See also

Specifies the distance between the lines in the border or the width of the line in the center of the border.

property MidLineWidth: Integer;

Description

Use MidLineWidth to configure the proportions in the border. The exact interpretation of MidLineWidth varies, depending on the value of BorderStyle. It reflects the space between lines, or the width of a central, contrasting region.


 CLX Reference

TFrameControl methods

TFrameControl	Alphabetically	Legend

In TFrameControl

ContentsRect

Create

CreateWidget

InitWidget

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Show

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

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


 CLX Reference

TFrameControl methods

TFrameControl	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

CreateWidget

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TFrameControl.ContentsRect
 CLX Reference

TFrameControl.ContentsRect

TFrameControl	See also

Returns the dimensions of the area inside the control’s border.

function ContentsRect: TRect;

Description

Call ContentsRect to obtain the dimensions of the portion of the control inside its border. The value of ContentsRect is the same as the client area (ClientRect), unless the control contains additional features, such as a scroll bar, that appear inside the frame.


TFrameControl.Create
 CLX Reference

TFrameControl.Create

TFrameControl	See also

Creates an instance of TFrameControl.

constructor Create(AOwner: TComponent); override;

Description

Call Create to construct and initialize an instance of TFrameControl. 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.

AOwner is a component, typically the form, that is responsible for freeing the frame control instance.

Note:	If a component's constructor allocates resources or memory, also override the destructor to free those resources.


TFrameControl.CreateWidget
 CLX Reference

TFrameControl.CreateWidget

TCustomRadioGroup	See also

Instantiates the underlying widget that implements the frame control.

procedure CreateWidget; override;

Description

CreateWidget is called automatically when the control needs to instantiate the underlying widget on which it is based. CreateWidget generates a new widget instance, and sets its handle as the value of the Handle property.

Do not call the CreateWidget method. To cause the control to create its underlying widget, call the HandleNeeded method or read the Handle property instead.


TFrameControl.InitWidget
 CLX Reference

TFrameControl.InitWidget

TFrameControl	See also

Initializes the underlying widget after it is created.

procedure InitWidget; override;

Description

InitWidget is called automatically, immediately after the underlying widget is created. It allows controls to initialize the underlying widget.

TFrameControl overrides the InitWidget method to ensure that the underlying widget’s frame properties match the properties of TFrameControl.

When overriding the InitWidget method, first call the inherited method so that the widget is fully initialized.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl


TGroupBox
 CLX Reference

 TGroupBox

Hierarchy	Properties	Methods	Events	Using TGroupBox	See also

TGroupBox represents a  group box.

Unit

The TGroupBox component represents a standard  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.


 CLX Reference

TGroupBox properties

TGroupBox	Alphabetically	Legend

Derived from TCustomGroupBox

Alignment

Handle

Derived from TFrameControl

BorderStyle

Derived from TWidgetControl

Bitmap

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Masked

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TGroupBox Properties

TGroupBox	By Object	Legend

Action

Align

Alignment

Anchors

Bitmap

BorderStyle

BoundsRect

Brush

Caption

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Masked

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width


 CLX Reference

TGroupBox events

TGroupBox	Alphabetically	Legend

Derived from TWidgetControl

OnEnter

OnExit

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TGroupBox Events

TGroupBox	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TGroupBox methods

TGroupBox	Alphabetically	Legend

Derived from TCustomGroupBox

Create

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TGroupBox Methods

TGroupBox	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomGroupBox

TGroupBox


TGraphicControl
 CLX Reference

TGraphicControl

Hierarchy	Properties	Methods	See also

TGraphicControl is the base class for all lightweight controls.

Unit

QControls

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 Qt widgets, they are faster and user fewer resources than controls based on TWidgetControl.

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.


 CLX Reference

TGraphicControl Properties

TGraphicControl	Alphabetically	Legend

In TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Enabled

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Parent

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TGraphicControl Properties

TGraphicControl	By Object	Legend

Action

Align

Anchors

BoundsRect

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ShowHint

Tag

Top

Visible

Width


TGraphicControl.Canvas
 CLX 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 Qt widget, it obtains its QPainter object from its parent control.


 CLX Reference

TGraphicControl Methods

TGraphicControl	Alphabetically	Legend

In TGraphicControl

Create

Destroy

Paint

PaintRequest

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

Invalidate

ParentToClient

Refresh

Repaint

ScreenToClient

SendToBack

SetBounds

Show

Update

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX 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

DragDrop

Dragging

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

MethodAddress

MethodName

NewInstance

Paint

PaintRequest

ParentToClient

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

Show

Update

UpdateAction


TGraphicControl.Create
 CLX 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
 CLX 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
 CLX 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.


TGraphicControl.PaintRequest
 CLX Reference

TGraphicControl.PaintRequest

TGraphicControl	See also

Request child update.

procedure PaintRequest; dynamic;

Description

Since a lightweight control uses a QPainter object borrowed from its parent, it effectively shares the parent's widget. When the parent repaints itself, the lightweight control must do the same. TGraphicControl handles this situation by overriding PaintRequest to have the control call its own Paint method.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl


THashedStringList
 CLX 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.


 CLX 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


 CLX Reference

THashedStringList properties

THashedStringList	By object	Legend

Capacity

CaseSensitive

CommaText

Count

DelimitedText

Delimiter

Duplicates

Names

Objects

QuoteChar

Sorted

Strings

StringsAdapter

Text

Values


 CLX Reference

THashedStringList events

THashedStringList	Alphabetically	Legend

Derived from TStringList

OnChange

OnChanging


 CLX Reference

THashedStringList events

THashedStringList	By object	Legend

OnChange

OnChanging


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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


THeaderSections
 CLX Reference

THeaderSections

Hierarchy	Properties	Methods	See also

THeaderSections is a container for THeaderSection objects.

Unit

QComCtrls

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.

THeaderSections implements the generic behavior introduced in TCustomHeaderSections.


 CLX Reference

THeaderSections Properties

THeaderSections	Alphabetically	Legend

In THeaderSections

Items

Derived from TCollection

Count

ItemClass


 CLX Reference

THeaderSections Properties

THeaderSections	By Object	Legend

Count

ItemClass

Items


THeaderSections.Items
 CLX 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.


 CLX Reference

THeaderSections Methods

THeaderSections	Alphabetically	Legend

In THeaderSections

Add

Derived from TCustomHeaderSections

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


 CLX Reference

THeaderSections Methods

THeaderSections	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


THeaderSections.Add
 CLX Reference

THeaderSections.Add

THeaderSections	See also

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.


Hierarchy

TObject

TPersistent

TCollection

TCustomHeaderSections

THeaderSections


THelpAction
 CLX 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

QStdActns

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.


 CLX Reference

THelpAction properties

THelpAction	Alphabetically	Legend

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

THelpAction properties

THelpAction	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

THelpAction events

THelpAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

THelpAction events

THelpAction	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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 HyperHelp. 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


THintWindow
 CLX 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

QControls

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.


 CLX Reference

THintWindow Properties

THintWindow	Alphabetically	Legend

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

THintWindow Properties

THintWindow	By Object	Legend

Action

Align

Anchors

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentWidget

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width


 CLX Reference

THintWindow methods

THintWindow	Alphabetically	Legend

In THintWindow

ActivateHint

ActivateHintData

CalcHintRect

Create

FontChanged

ReleaseHandle

Derived from TCustomControl

Destroy

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX 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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

FontChanged

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

ReleaseHandle

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


THintWindow.ActivateHint
 CLX 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
 CLX 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
 CLX 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
 CLX 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.FontChanged
 CLX Reference

THintWindow.FontChanged

THintWindow	See also

Responds when the Font property changes.

procedure FontChanged; override;

Description

THintWindow overrides FontChanged so the hint window can resize and refresh itself based on the new font.


THintWindow.ReleaseHandle
 CLX 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

TWidgetControl

TCustomControl

THintWindow


THandleComponent
 CLX Reference

THandleComponent

Hierarchy	Properties	Methods	See also

THandleComponent is the base class for non-visual components that require a Handle.

Unit

QTypes

Description

Do not create instances of THandleComponent. Use THandleComponent as a base class when declaring non-visual components that require a handle to an underlying widget, can appear on the component palette, and can be used in the form designer. Properties and methods of THandleComponent provide basic behavior that descendant classes inherit, as well as behavior that non-visual components can override to customize their behavior. The menu components and the timer component are examples of THandleComponent descendants.


 CLX Reference

THandleComponent properties

THandleComponent	Alphabetically	Legend

In THandleComponent

Handle

HelpContext

HelpFile

HelpKeyword

HelpType

Hooks

ParentWidget

In TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

THandleComponent properties

THandleComponent	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Handle

HelpContext

HelpFile

HelpKeyword

HelpType

Hooks

Name

Owner

ParentWidget

Tag


THandleComponent.Handle
 CLX Reference

THandleComponent.Handle

THandleComponent	See also

Provides access to the unique 4-byte identifier that represents the instance of the underlying widget.

property Handle: QObjectH;

Description

Use Handle to obtain a handle to the instance of the underlying Qt widget object. Use this handle for API calls into the Qt shared libraries.


THandleComponent.HelpContext
 CLX Reference

THandleComponent.HelpContext

THandleComponent	See also

Specifies the context ID that identifies the help topic for this component.

property HelpContext: Integer;

Description

Set HelpContext to a context ID that identifies the component’s help topic. Not all help systems support context IDs. When setting HelpContext, be sure that the current help system supports context IDs and that the application’s HelpType property is htContext.


THandleComponent.HelpFile
 CLX Reference

THandleComponent.HelpFile

THandleComponent	See also

Specifies the name of the file that contains this component’s help topic.

property HelpFile: string;

Description

Use HelpFile to specify a help file when the help for this component is not in the same file as the form uses.

The Help system specified by HelpSystem displays a help topics from this file when the user presses the key specified by the applications HelpKey property.

If HelpFile is a null string, the component looks for its help topic in the file specified by the form’s HelpFile property.


THandleComponent.HelpKeyword
 CLX Reference

THandleComponent.HelpKeyword

THandleComponent	See also

Specifies the keyword that identifies the help topic for this component.

property HelpKeyword: string;

Description

Set HelpKeyword to a string (keyword) that identifies this component’s help topic. The interpretation of HelpKeyword depends on which help system is used to display the topic. For example, when using HyperHelp (on Linux) or WinHelp (on Windows), HelpKeyword refers to an A link.

Note:	HelpKeyword is only used when the component’s HelpType property is htKeyword.


THandleComponent.HelpType
 CLX Reference

THandleComponent.HelpType

THandleComponent	See also

Indicates whether the component’s help topic is identified by context ID or by keyword.

property HelpType: THelpType;

Description

Set HelpType to specify whether this component identifies its default help topic by ID or keyword. When HelpType is htContext, the HelpContext property identifies the help topic. When HelpType is htKeyword, the HelpKeyword property identifies the help topic.


THandleComponent.Hooks
 CLX Reference

THandleComponent.Hooks

THandleComponent	See also

Provides access to the handle of an event hook object installed on the widget.

property Hooks: QObject_hookH;

Description

Use Hooks to obtain a handle to the event hook object that allows this component to respond to events from the underlying widget. Typically, THandleComponent descendants do not need to work directly with the Hooks property. Instead, they configure the component’s response to widget events by overriding the HookEvents method.


THandleComponent.ParentWidget
 CLX Reference

THandleComponent.ParentWidget

THandleComponent	See also

Specifies the handle of the component’s parent widget.

property ParentWidget: QWidgetH

Description

Use ParentWidget to obtain the handle of the widget that acts as a parent to this control’s widget. If the ParentWidget property is not explicitly set, the value of ParentWidget is the handle to the widget for the application’s main form. If there is no main form, it is the desktop widget (the topmost widget that has focus).


 CLX Reference

THandleComponent methods

THandleComponent	Alphabetically	Legend

In THandleComponent

CreateHandle

CreateWidget

Destroy

DestroyWidget

EventFilter

HandleAllocated

HandleNeeded

HookEvents

InitWidget

InvokeHelp

SetHelpContext

SetHelpKeyword

WidgetDestroyed

In TComponent

BeforeDestruction

Create

DestroyComponents

Destroying

FindComponent

FreeNotification

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


 CLX Reference

THandleComponent methods

THandleComponent	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateHandle

CreateWidget

DefaultHandler

Destroy

DestroyComponents

Destroying

DestroyWidget

Dispatch

EventFilter

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleAllocated

HandleNeeded

HasParent

HookEvents

InheritsFrom

InitInstance

InitWidget

InsertComponent

InstanceSize

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetHelpContext

SetHelpKeyword

SetSubComponent

WidgetDestroyed


THandleComponent.CreateHandle
 CLX Reference

THandleComponent.CreateHandle

THandleComponent	See also

Generates the underlying widget for the component if it does not already exist.

procedure CreateHandle; virtual;

Description

When an application tries to read the Handle property, THandleComponent calls CreateHandle if the underlying widget does not already exist. After calling CreateWidget to create a widget instance, CreateHandle calls the InitWidget and HookEvents methods to initialize the widget.

Note:	CreateHandle raises an exception if the underlying widget cannot be created.


THandleComponent.CreateWidget
 CLX Reference

THandleComponent.CreateWidget

THandleComponent	See also

Introduces an abstract method that creates the underlying Qt widget used by the component.

procedure CreateWidget; virtual; abstract;

Description

CreateWidget is called automatically when the component needs to create its underlying widget. Each descendent component overrides the CreateWidget method to create the appropriate type of Qt widget for the component.


THandleComponent.Destroy
 CLX Reference

THandleComponent.Destroy

THandleComponent	See also

Destroys an instance of THandleComponent..

procedure Destroy; virtual;

Description

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

THandleComponent's Destroy method calls DestroyWidget to destroy the widget associated with the component before calling the inherited destructor.


THandleComponent.DestroyWidget
 CLX Reference

THandleComponent.DestroyWidget

THandleComponent	See also

Destroys the widget created in the CreateWidget method without destroying the component itself.

procedure DestroyWidget; virtual;

Description

Call DestroyWidget to dispose of the underlying widget for the control.

THandleComponent's destructor calls DestroyWidget to destroy the widget associated with the component before destroying the component itself.


THandleComponent.EventFilter
 CLX Reference

THandleComponent.EventFilter

THandleComponent	See also

Responds to system events.

function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; virtual; cdecl;

Description

EventFilter is called automatically in response to events detected by the underlying widget. Such events include mouse events, keyboard events, and system changes (such as changes to the palette). EventFilter gives the component an opportunity to respond to the event that occurred.

Sender is the handle to the underlying widget that receives the event. This is the same as the Handle property.

Event is the handle to the Qt event object. This object provides information about the event that occurred.

EventFilter returns Ttrue if the control bar handles the event, False otherwise.

In THandleComponent, EventFilter responds to notifications that the user pressed the HelpKey by invoking the component’s help topic.

Note:	When overriding the EventFilter method, be sure to call the inherited method so that the default event processing can occur.


THandleComponent.HandleAllocated
 CLX Reference

THandleComponent.HandleAllocated

THandleComponent	See also

Reports whether a widget handle exists for the control.

function HandleAllocated: Boolean;

Description

Call HandleAllocated to find out if the control’s underlying widget has been generated. If a widget exists, HandleAllocated returns True. If no widget exists, HandleAllocated returns False.

Reading the Handle property directly causes the widget to be created if it does not already exist. Call the HandleAllocated method to determine whether a widget exists without creating one as a side effect.


THandleComponent.HandleNeeded
 CLX Reference

THandleComponent.HandleNeeded

THandleComponent	See also

Creates a widget for the component if it doesn't already exist.

procedure HandleNeeded;

Description

Call HandleNeeded to ensure that the component’s underlying widget exists.


THandleComponent.HookEvents
 CLX Reference

THandleComponent.HookEvents

THandleComponent	See also

Provides an interface to create and install callback functions for system events and widget signals.

procedure HookEvents; virtual;

Description

Component writers can override HookEvents to create and install callback functions for specific widget signals when creating new components based on THandleComponent.

THandleComponent's HookEvents method creates a hook object for the component if one does not exist and then creates and installs callback functions for all system events and the destroyed signal for the widget. The destroyed signal generates a destroyed event which is processed by the WidgetDestroyed notification method.

When creating and installing callbacks for a descendent component, the following code is used:

procedure TMyCustomComponent.HookEvents;

var

  Method: TMethod;

begin

  QObject_signalname_event(Method) := SignalNameHook;

  QObject_hook_hook_signalname(FHooks, Method);

  inherited HookEvents;

end;

Where signalname is the widget signal that needs to be installed and SignalNameHook is the callback method that will will be called when the widget emits this signal.


THandleComponent.InitWidget
 CLX Reference

THandleComponent.InitWidget

THandleComponent	See also

Initializes the underlying widget for the component.

function InitWidget; virtual;

Description

Override InitWidget to initialize the underlying widget after it is created and prior to it being used for the first time.

As implemented in THandleComponent, InitWidget does nothing. It exists to allow descendant classes an opportunity to initialize the widget.


THandleComponent.InvokeHelp
 CLX Reference

THandleComponent.InvokeHelp

THandleComponent	See also

Displays the context-sensitive help topic for this component.

function InvokeHelp; virtual;

Description

Call InvokeHelp to display the help topic for this component. InvokeHelp checks the HelpType property, and if it is htKeyword, calls the help system, passing in the HelpKeyword property. If HelpType is htContext, InvokeHelp calls the help system, passing in the HelpContext property.


THandleComponent.SetHelpContext
 CLX Reference

THandleComponent.SetHelpContext

THandleComponent	See also

Sets the value of the HelpContext property.

procedure SetHelpContext(const Value: THelpContext);

Description

SetHelpContext is the protected write implementation of the HelpContext property. It sets the HelpType property to htContext as a side-effect of setting the help context for this component.


THandleComponent.SetHelpKeyword
 CLX Reference

THandleComponent.SetHelpKeyword

THandleComponent	See also

Sets the value of the HelpKeyword property.

procedure SetHelpKeyword(const Value: string);

Description

SetHelpKeyword is the protected write implementation of the HelpKeyword property. It sets the HelpType property to htKeyword as a side-effect of setting the help keyword for this component.


THandleComponent.WidgetDestroyed
 CLX Reference

THandleComponent.WidgetDestroyed

THandleComponent	See also

Occurs when the underlying widget is destroyed.

procedure WidgetDestroyed; virtual;

Description

Override WidgetDestroyed to perform any special processing that should occur immediately after the underlying widget encapsulated by the component is destroyed.

As implemented in THandleComponent, WidgetDestroyed cleans up the hooks used to respond to system events. Descendant classes should call the inherited method when overriding WidgetDestroyed so that this cleanup still occurs.


Hierarchy

TObject

TPersistent

TComponent

THandleComponent


THandleStream
 CLX Reference

THandleStream

Hierarchy	Properties	Methods	See also

THandleStream enables applications to read from and write to communications resources identified by a  handle.

Unit

Classes

Description

Use THandleStream to access files, sockets, named pipes, mailslots, or other communications resources that provide a  handle when opened. For example, the FileOpen function provides a  handle for a file on disk. THandleStream allows applications to use a uniform stream interface when performing I/O using a  handle.

To avoid the overhead of managing file handles, use TFileStream to work with disk files.


 CLX Reference

THandleStream properties

THandleStream	Alphabetically	Legend

In THandleStream

Handle

Derived from TStream

Position

Size


 CLX Reference

THandleStream properties

THandleStream	By object	Legend

Handle

Position

Size


THandleStream.Handle
 CLX 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  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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TIconOptions
 CLX Reference

TIconOptions

Hierarchy	Properties	Methods	See also

TIconOptions describes how the icons in an icon view should be arranged.

Unit

QComCtrls

Description

Use TIconOptions with a an icon view. The IconOptions property of the view contains a TIconOptions object that determines the arrangement of the icons.


 CLX Reference

TIconOptions properties

TIconOptions	Alphabetically	Legend

In TIconOptions

Arrangement

AutoArrange

WrapText


 CLX Reference

TIconOptions properties

TIconOptions	By object	Legend

Arrangement

AutoArrange

WrapText


TIconOptions.Arrangement
 CLX 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
 CLX 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.


TIconOptions.WrapText
 CLX 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.


 CLX 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


 CLX 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
 CLX Reference

TIconOptions.Create

TIconOptions	See also

Creates an instance of TIconOptions.

constructor Create(AOwner: TCustomIconView);

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
 CLX 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.


 CLX Reference

IComponentEditor methods

IComponentEditor	Alphabetically	Legend

In IComponentEditor

Copy

Edit

ExecuteVerb

GetComponent

GetDesigner

GetVerb

GetVerbCount

IsInInlined

Derived from IInterface

_AddRef

_Release

QueryInterface


 CLX Reference

IComponentEditor methods

IComponentEditor	By object	Legend

_AddRef

_Release

Copy

Edit

ExecuteVerb

GetComponent

GetDesigner

GetVerb

GetVerbCount

IsInInlined

QueryInterface


IComponentEditor.Copy
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


Hierarchy

IInterface

IComponentEditor


IDesignerNotify
 CLX 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.


 CLX Reference

IDesignerNotify methods

IDesignerNotify	Alphabetically	Legend

In IDesignerNotify

Modified

Notification

Derived from IInterface

_AddRef

_Release

QueryInterface


 CLX Reference

IDesignerNotify methods

IDesignerNotify	By object	Legend

_AddRef

_Release

Modified

Notification

QueryInterface


IDesignerNotify.Modified
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

IDesigner properties

IDesigner	Alphabetically	Legend

In IDesigner

AncestorDesigner

IsDormant

Root


 CLX Reference

IDesigner properties

IDesigner	By object	Legend

AncestorDesigner

IsDormant

Root


IDesigner.AncestorDesigner
 CLX 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
 CLX 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
 CLX 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


 CLX 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


 CLX 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
 CLX 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
 CLX 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 clipboard.

If the user subsequently chooses the Paste command, the PasteSelection method handles the details of pasting the contents of the clipboard.


IDesigner.ChainCall
 CLX 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
 CLX 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
 CLX Reference

IDesigner.CopySelection

IDesigner	See also

Copies the selected component or components to the clipboard

procedure CopySelection;

Description

Call CopySelection to copy the components returned by GetSelections to the clipboard.


IDesigner.CreateComponent
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

IDesigner.CutSelection

IDesigner	See also

Copies the selected component or components to the clipboard

procedure CutSelection;

Description

Call CutSelection to cut the components returned by GetSelections to the clipboard. CutSelection has the same effect as a call to CopySelection and to DeleteSelection, but in a single action.


IDesigner.DeleteSelection
 CLX Reference

IDesigner.DeleteSelection

IDesigner	See also

Deletes the selected component or components

procedure DeleteSelection;

Description

Call DeleteSelection to remove the selected components in the designer and free their memory.

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
 CLX 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
 CLX 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
 CLX Reference

IDesigner.GetBaseRegKey

IDesigner	See also

Returns the name of the file where the form designer saves option values.

function GetBaseRegKey: string;

Description

On Linux, GetBaseRegKey returns the name of the file where Kylix stores settings that the form designer uses.

 GetBaseRegKey returns the root key in the system registry where Delphi stores this same information. This information includes

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

IDesigner.GetPathAndBaseExeName

IDesigner	See also

Returns the fully-qualified path name for the Kylix executable.

function GetPathAndBaseExeName: string;

Description

Call GetPathAndBaseExeName to obtain the fully qualified path name for the Kylix executable.


IDesigner.GetPrivateDirectory
 CLX 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 file or registry key specified by GetBaseRegKey under the heading or subkey PrivateDir.


IDesigner.GetProjectModules
 CLX 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.  On Windows, the CoClasses parameter lists all CoClasses supported by the module.


IDesigner.GetRoot
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 (.xfm) for the root object.


IDesigner.NoSelection
 CLX 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
 CLX 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 clipboard to the components returned by GetSelections.


IDesigner.RenameMethod
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


IDesignerHook
 CLX 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

QForms

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.


 CLX Reference

IDesignerHook properties

IDesignerHook	Alphabetically	Legend

In IDesignerHook

Form

Root


 CLX Reference

IDesignerHook properties

IDesignerHook	By object	Legend

Form

Root


IDesignerHook.Form
 CLX 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.


IDesignerHookRoot
 CLX Reference

IDesignerHook.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


 CLX Reference

IDesignerHook methods

IDesignerHook	Alphabetically	Legend

In IDesignerHook

ControlPaintRequest

GetCustomForm

GetRoot

IsDesignEvent

PaintGrid

UniqueName

ValidateRename

Derived from IDesignerNotify

Modified

Notification

Derived from IInterface

_AddRef

_Release

QueryInterface


 CLX Reference

IDesignerHook methods

IDesignerHook	By object	Legend

_AddRef

_Release

ControlPaintRequest

GetCustomForm

GetRoot

IsDesignEvent

Modified

Notification

PaintGrid

QueryInterface

UniqueName

ValidateRename


IDesignerHook.ControlPaintRequest
 CLX Reference

IDesignerHook.ControlPaintRequest

IDesignerHook

Forwards a paint request to the underlying widget layer.

procedure ControlPaintRequest(Control: TControl);

Description

ControlPaintRequest is called when the designer detects that it needs to paint a control. Control is the control that needs to be repainted.


IDesignerHook.GetCustomForm
 CLX 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.GetRoot
 CLX 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.IsDesignEvent
 CLX Reference

IDesignerHook.IsDesignEvent

IDesignerHook	See also

Determines when the designer should handle a Windows message.

function IsDesignEvent(Sender: TWidgetControl; Event: QObjectH): Boolean;

Description

IsDesignEvent is called for each event notification sent to a component in the designer. This method returns True if the event is a design event, meaning one the designer should handle for the component.


IDesignerHook.PaintGrid
 CLX 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.UniqueName
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

IDesignerSelections properties

IDesignerSelections	Alphabetically	Legend

In IDesignerSelections

Count

Items


 CLX Reference

IDesignerSelections properties

IDesignerSelections	By object	Legend

Count

Items


IDesignerSelections.Count
 CLX 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
 CLX 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.


 CLX Reference

IDesignerSelections methods

IDesignerSelections	Alphabetically	Legend

In IDesignerSelections

Add

Equals

Get

GetCount

Derived from IInterface

_AddRef

_Release

QueryInterface


 CLX Reference

IDesignerSelections methods

IDesignerSelections	By object	Legend

_AddRef

_Release

Add

Equals

Get

GetCount

QueryInterface


IDesignerSelections.Add
 CLX 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
 CLX 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
 CLX 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
 CLX 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


IInterface
 CLX 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.


 CLX Reference

IInterface methods

IInterface	Alphabetically	Legend

In IInterface

_AddRef

_Release

QueryInterface


 CLX Reference

IInterface methods

IInterface	By object	Legend

_AddRef

_Release

QueryInterface


IInterface._AddRef
 CLX 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
 CLX 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
 CLX 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


TImageList
 CLX 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

QImgList

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.

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


 CLX Reference

TImageList properties

TImageList	Alphabetically	Legend

Derived from TCustomImageList

BkColor

Count

Height

Masked

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TImageList properties

TImageList	By object	Legend

BkColor

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Count

DesignInfo

Height

Masked

Name

Owner

Tag

Width


 CLX Reference

TImageList events

TImageList	Alphabetically	Legend

Derived from TCustomImageList

OnChange


 CLX Reference

TImageList events

TImageList	By object	Legend

OnChange


 CLX Reference

TImageList methods

TImageList	Alphabetically	Legend

Derived from TCustomImageList

Add

AddImages

AddMasked

Assign

Clear

Create

CreateSize

Delete

Destroy

Draw

GetBitmap

GetMask

GetPixmap

Insert

InsertMasked

Move

ReadData

RegisterChanges

Replace

ReplaceMasked

UnRegisterChanges

WriteData

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

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


 CLX Reference

TImageList methods

TImageList	By object	Legend

Add

AddImages

AddMasked

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

CreateSize

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

Dispatch

Draw

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetBitmap

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetMask

GetNamePath

GetParentComponent

GetPixmap

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertMasked

InstanceSize

IsImplementorOf

MethodAddress

MethodName

Move

NewInstance

ReadData

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

Replace

ReplaceMasked

SafeCallException

SetSubComponent

UnRegisterChanges

UpdateAction

WriteData


Hierarchy

TObject

TPersistent

TComponent

TCustomImageList

TImageList


TIniFile
 CLX 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. An INI file stores information in logical groupings, called “sections.” 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.

Note:	On Linux, TIniFile is the same as TMemIniFile. This differs from the Windows product, in which TIniFile does not buffer writes in memory the way TMemIniFile does.


 CLX Reference

TIniFile properties

TIniFile	Alphabetically	Legend

Derived from TMemIniFile

CaseSensitive

Derived from TCustomIniFile

CaseSensitive

FileName


 CLX Reference

TIniFile properties

TIniFile	By object	Legend

FileName


 CLX Reference

TIniFile methods

TIniFile	Alphabetically	Legend

Derived from 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

WriteBinaryStream

WriteBool

WriteDate

WriteDateTime

WriteFloat

WriteInteger

WriteTime

ValueExists

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


 CLX Reference

TIniFile methods

TIniFile	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


Hierarchy

TObject

TCustomIniFile

TMemIniFile

TIniFile


TInplaceEdit
 CLX Reference

TInplaceEdit

Hierarchy	Properties	Methods	See also

TInPlaceEdit provides text editing capabilities for grid controls.

Unit

QGrids

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.


 CLX Reference

TInplaceEdit properties

TInplaceEdit	Alphabetically	Legend

In TInplaceEdit

Grid

Derived from TCustomMaskEdit

EditText

IsMasked

Text

Derived from TCustomEdit

Handle

Modified

SelLength

SelStart

SelText

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Enabled

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Parent

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TInplaceEdit properties

TInplaceEdit	By object	Legend

Action

Align

Anchors

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

EditText

Enabled

Grid

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

IsMasked

Left

Modified

Name

Owner

Parent

ParentWidget

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

Text

Top

Visible

Width


TInplaceEdit.Grid
 CLX 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.


 CLX Reference

TInplaceEdit methods

TInplaceEdit	Alphabetically	Legend

In TInplaceEdit

Create

DblClick

Deselect

DoMouseWheel

EditCanModify

Hide

Invalidate

KeyDown

KeyPress

KeyUp

Move

NeedKey

PosEqual

SetFocus

UpdateContents

UpdateLoc

Derived from TCustomMaskEdit

Clear

CutToClipboard

GetTextLen

PasteFromClipboard

ValidateEdit

Derived from TCustomEdit

ClearSelection

CopyToClipboard

GetSelTextBuf

SelectAll

SetSelTextBuf

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

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

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 CLX Reference

TInplaceEdit methods

TInplaceEdit	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DblClick

DefaultHandler

Deselect

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DoMouseWheel

DragDrop

Dragging

EditCanModify

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

KeyDown

KeyPress

KeyUp

MethodAddress

MethodName

Move

NeedKey

NewInstance

ParentToClient

PasteFromClipboard

PosEqual

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSelTextBuf

SetSubComponent

Show

Update

UpdateAction

UpdateContents

UpdateControlState

UpdateLoc

ValidateEdit


TInplaceEdit.BoundsChanged
 CLX 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
 CLX 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.DblClick
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.NeedKey
 CLX Reference

TInplaceEdit.NeedKey

TInplaceEdit	See also

Processes keystrokes.

function NeedKey(Key: Integer; Shift: TShiftState; KeyText: string): Boolean; override;

Description

NeedKey handles keystrokes that should not be intercepted by another control. NeedKey fits into the keystroke processing mechanism as follows: When a widget control receives keyboard messages

1. It calls NeedKey to handle any keystrokes that must be handled and that another control should not be allowed to intercept.

2. If NeedKey does not handle the message, the widget control checks whether the keystroke corresponds to a menu shortcut, and if so, lets the menu handle the keystroke.

3. If the menu does not handle the keystroke, it passes the keystroke to the form’s WantKey method, from which it may eventually be passed back to the widget control’s WantKey method.

Key is the integer representation of the key that the user pressed. It can be one of the symbolic key codes.

Shift indicates whether the Shift, Alt, and/or Control keys were simultaneously pressed.

KeyText is the character value of the key that was pressed.

NeedKey returns True if the method handled the keystroke, False otherwise.

As implemented in TInplaceEdit, NeedKey passes tab keys to the grid unless the grid options include goTabs.


TInplaceEdit.PosEqual
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomEdit

TCustomMaskEdit

TInplaceEdit


TInterfaceList
 CLX Reference

TInterfaceList

Hierarchy	Properties	Methods

TInterfaceList represents a list of interfaces.

Unit

Classes

Description

Use TInterfaceList to manage a list of interfaces.


 CLX Reference

TInterfaceList properties

TInterfaceList	Alphabetically	Legend

In TInterfaceList

Capacity

Count

Items

Derived from TInterfacedObject

RefCount


 CLX Reference

TInterfaceList properties

TInterfaceList	By object	Legend

Capacity

Count

Items

RefCount


TInterfaceList.Capacity
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX Reference

TInterfaceList.Clear

TInterfaceList	See also

Clears the interface list.

procedure Clear;

Description

Call Clear to remove all interfaces from the list.


TInterfaceList.Create
 CLX Reference

TInterfaceList.Create

TInterfaceList

Creates an interface list.

constructor Create;

Description

Call Create to create an interface list.


TInterfaceList.Delete
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


IUnknown
 CLX 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.


 CLX Reference

IUnknown methods

IUnknown	Alphabetically	Legend

Derived from IInterface

_AddRef

_Release

QueryInterface


 CLX Reference

IUnknown methods

IUnknown	By object	Legend

_AddRef

_Release

QueryInterface


Hierarchy

IInterface

IUnknown

IUnknown


IVarStreamable
 CLX 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.


 CLX Reference

IVarStreamable methods

IVarStreamable	Alphabetically	Legend

In IVarStreamable

StreamIn

StreamOut

Derived from IInterface

_AddRef

_Release

QueryInterface


 CLX Reference

IVarStreamable methods

IVarStreamable	By object	Legend

_AddRef

_Release

StreamIn

StreamOut

QueryInterface


IVarStreamable.StreamIn
 CLX 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
 CLX 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


TLabel
 CLX Reference

 TLabel

Hierarchy	Properties	Methods	Events	Using TLabel	See also

TLabel is a nonwindowed control that displays text or a bitmap on a form.

Unit

QStdCtrls

Description

Use TLabel to add text or a bitmap that the user can’t edit to a form. This text or a bitmap can be used to label another control, and can set focus to that control when the user types an accelerator key.

To add an object to a form that displays text that a user can scroll or edit, use TEdit.


 CLX Reference

TLabel properties

TLabel	Alphabetically	Legend

Derived from TCustomLabel

Alignment

AutoSize

Caption

FocusControl

Handle

Layout

ShowAccelChar

Transparent

WordWrap

Derived from TFrameControl

BorderStyle

ClientOrigin

Derived from TWidgetControl

Bitmap

Brush

ChildHandle

ClientRect

ControlCount

Controls

Enabled

Masked

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TLabel Properties

TLabel	By Object	Legend

Action

Align

Alignment

Anchors

AutoSize

Bitmap

BorderStyle

BoundsRect

Brush

Caption

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

FocusControl

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Layout

Left

Masked

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

ShowAccelChar

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Transparent

Visible

Width

WordWrap


 CLX Reference

TLabel events

TLabel	Alphabetically	Legend

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TLabel Events

TLabel	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TLabel methods

TLabel	Alphabetically	Legend

Derived from TCustomLabel

Create

SetBounds

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TLabel Methods

TLabel	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomLabel

TLabel


TList
 CLX 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.


 CLX Reference

TList properties

TList	Alphabetically	Legend

In TList

Capacity

Count

Items

List


 CLX Reference

TList properties

TList	By object	Legend

Capacity

Count

Items

List


TList.Capacity
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TListView
 CLX Reference

TListView

Hierarchy	Properties	Methods	Events	Using TListView	See also

TListView displays a list of items in one or more columns.

Unit

QComCtrls

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.

TListView publishes many of the properties, events, and methods of TCustomListView, but does not introduce any new behavior.


 CLX Reference

TListView Properties

TListView	Alphabetically	Legend

Derived from TCustomListView

CheckBoxes

DropTarget

ItemFocused

Items

Selected

TopItem

ViewStyle

Derived from TCustomViewControl

ColumnClick

ColumnResize

Images

MultiSelect

OwnerDraw

ReadOnly

RowSelect

SelCount

ShowColumnSortIndicators

SortColumn

SortDirection

Sorted

Derived from TFrameControl

BorderStyle

ClientOrigin

Derived from TWidgetControl

Brush

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TListView Properties

TListView	By Object	Legend

Action

Align

Anchors

BorderStyle

BoundsRect

Brush

CheckBoxes

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ColumnClick

ColumnResize

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

DropTarget

Enabled

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Images

ItemFocused

Items

Left

MultiSelect

Name

Owner

OwnerDraw

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ReadOnly

RowSelect

SelCount

Selected

ShowColumnSortIndicators

ShowHint

Showing

SortColumn

SortDirection

Sorted

TabOrder

TabStop

Tag

Top

TopItem

ViewStyle

Visible

Width


 CLX Reference

TListView Events

TListView	Alphabetically	Legend

Derived from TCustomListView

OnChange

OnChanging

OnDeletion

OnDrawItem

OnEdited

OnEditing

OnGetImageIndex

OnInsert

OnItemClick

OnItemDoubleClick

OnItemEnter

OnItemExitViewportEnter

OnItemMouseDown

OnSelectItem

OnViewPortMouseDown

Derived from TCustomViewControl

OnColumnClick

OnColumnDragged

OnColumnResize

OnCustomDrawItem

OnCustomDrawSubItem

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDrag


 CLX Reference

TListView Events

TListView	By Object	Legend

OnChange

OnChanging

OnClick

OnColumnClick

OnColumnDragged

OnColumnResize

OnContextPopup

OnCustomDrawItem

OnCustomDrawSubItem

OnDblClick

OnDeletion

OnDragDrop

OnDragOver

OnDrawItem

OnEdited

OnEditing

OnEndDrag

OnEnter

OnExit

OnGetImageIndex

OnInsert

OnItemClick

OnItemDoubleClick

OnItemEnter

OnItemExitViewportEnter

OnItemMouseDown

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnSelectItem

OnStartDrag

OnViewPortMouseDown


 CLX Reference

TListView Methods

TListView	Alphabetically	Legend

Derived from TCustomListView

AlphaSort

Create

Destroy

FindCaption

FindData

GetItemAt

GetNearestItem

GetNextItem

Scroll

UpdateItems

Derived from TCustomViewControl

InvertSelection

IsEditing

Sort

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TListView Methods

TListView	By Object	Legend

AfterConstruction

AlphaSort

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindCaption

FindChildControl

FindComponent

FindData

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItemAt

GetNamePath

GetNearestItem

GetNextItem

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvertSelection

InvokeHelp

IsEditing

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

Scroll

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Sort

Update

UpdateAction

UpdateControlState

UpdateItems


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomViewControl

TCustomListView

TListView


TListColumn
 CLX Reference

TListColumn

Hierarchy	Properties	Methods	See also

TListColumn represents a column in a report-style list view.

Unit

QComCtrls

Description

TListView objects use TListColumns to maintain a collection of TListColumn objects.


 CLX Reference

TListColumn Properties

TListColumn	Alphabetically	Legend

In TListColumn

Alignment

AutoSize

Caption

Width

Derived from TCustomHeaderSection

AllowClick

AllowResize

DisplayName

MaxWidth

MinWidth

Derived from TCollectionItem

Collection

ID

Index


 CLX Reference

TListColumn Properties

TListColumn	By Object	Legend

Alignment

AllowClick

AllowResize

AutoSize

Caption

Collection

DisplayName

ID

Index

MaxWidth

MinWidth

Width


TListColumn.Alignment
 CLX 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.AssignTo
 CLX Reference

TListColumn.AssignTo

TListColumn	See also

Specialized AssignTo

procedure AssignTo(Dest: TPersistent); override;

Description

Do not call the protected AssignTo method. 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.


TListColumn.AutoSize
 CLX 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
 CLX 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.Width
 CLX Reference

TListColumn.Width

TListColumn	See also

Specifies the width of the column.

property Width;

Description

TListColumn exposes the protected Width property defined in TCustomListColumn.


 CLX Reference

TListColumn Methods

TListColumn	Alphabetically	Legend

In TListColumn

AddSection

AssignTo

Destroy

Resubmit

SetWidthVal

Derived from TCustomHeaderSection

Create

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


 CLX Reference

TListColumn Methods

TListColumn	By Object	Legend

AddSection

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

Resubmit

SafeCallException

SetWidthVal


TListColumn.AddSection
 CLX Reference

TListColumn.AddSection

TListColumn	See Also

function AddSection: Integer; override;

Description

TListColumn overrides AddSection in order to coordinate the new column's properties with underlying QListView and QHeader widgets, to refresh the column display, and to initialize the Alignment property.


TListColumn.Destroy
 CLX 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.


TListcolumn.Resubmit
 CLX Reference

TListcolumn.::Resubmit

TListcolumn

Resubmit information to Qt widget.

procedure Resubmit; override;

Description

Resubmit is called automatically when state information for the underlying Qt widget may be out of date for this column.


TListColumn.SetWidthVal
 CLX Reference

TListColumn.::SetWidthVal

TListColumn 	See Also

Respond to change in Width.

procedure SetWidthVal(const Value: Integer); override;

Description

TListColumn relies on the underlying QListView widget to record the columns width, instead of maintaining this state information internally. TListColumn overrides SetWidthVal in order to pass the new width to the widget.


Hierarchy

TObject

TPersistent

TCollectionItem

TCustomHeaderSection

TListColumn


TMainMenu
 CLX 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

QMenus

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.


 CLX Reference

TMainMenu properties

TMainMenu	Alphabetically	Legend

In TMainMenu

AutoMerge

Handle

Derived from TMenu

AutoHotkeys

Bitmap

Color

Images

Items

Derived from THandleComponent

HelpContext

HelpKeyword

HelpType

Hooks

ParentWidget

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TMainMenu Properties

TMainMenu	By Object	Legend

AutoHotkeys

AutoMerge

Bitmap

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Handle

HelpContext

HelpKeyword

HelpType

Hooks

Images

Items

Name

Owner

ParentWidget

Tag


TMainMenu.AutoMerge
 CLX 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
 CLX Reference

TMainMenu.Handle

TMainMenu	See also

Provides access to the unique 4-byte identifier that represents the instance of the underlying Qt QMenuBar object.

property Handle: QMenuBarH;

Description

Use Handle to return a typed pointer to the instance of the underlying Qt QMenuBar object. This Handle can be used when making low-level function calls into the Qt shared libraries, where the function call requires an instance pointer to a QMenuBar object.


 CLX Reference

TMainMenu events

TMainMenu	Alphabetically	Legend

Derived from TMenu

OnChange


 CLX Reference

TMainMenu events

TMainMenu	By Object	Legend

OnChange


 CLX Reference

TMainMenu methods

TMainMenu	Alphabetically	Legend

In TMainMenu

IsShortCut

Merge

Unmerge

Derived from TMenu

Create

Destroy

FindItem

SetForm

Derived from THandleComponent

HandleAllocated

HandleNeeded

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


 CLX Reference

TMainMenu Methods

TMainMenu	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FindItem

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleAllocated

HandleNeeded

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

IsShortCut

Merge

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetForm

SetSubComponent

Unmerge

UpdateAction


TMainMenu.IsShortCut
 CLX Reference

TMainMenu.IsShortCut

TMainMenu

Dispatches a key if it represents a shortcut key for an item in the menu.

function IsShortCut(Key: Integer; Shift: TShiftState; KeyText: WideString): Boolean; override;

Description

IsShortCut is called automatically when the user presses a key while the menu has focus. It allows the menu to dispatch shortcut keys and bypass the standard keystroke processing (OnKeyDown, OnKeyPress, and OnKeyUp events).

Key is the key code for the key the user pressed.

Shift indicates the state of the Shift, Ctrl, and Alt keys.

KeyText is the character specified by the pressed key.

If a shortcut for the key exists, IsShortCut executes the appropriate command and returns True. Otherwise IsShortCut returns False.


TMainMenu.Merge
 CLX 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.Unmerge
 CLX 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

THandleComponent

TMenu

TMainMenu


TMaskEdit
 CLX Reference

 TMaskEdit

Hierarchy	Properties	Methods	Events	See also

TMaskEdit implements a generic masked edit control.

Unit

QMask

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.


 CLX Reference

TMaskEdit Properties

TMaskEdit	Alphabetically	Legend

Derived from TCustomMaskEdit

BeepOnError

EditMask

EditText

IsMasked

MaxLength

SelText

Text

Derived from TCustomEdit

AutoSelect

AutoSize

BorderStyle

CharCase

Handle

Modified

ReadOnly

SelLength

SelStart

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TMaskEdit Properties

TMaskEdit	By Object	Legend

Action

Align

Anchors

AutoSelect

AutoSize

BeepOnError

BorderStyle

BoundsRect

Brush

CharCase

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

EditMask

EditText

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

IsMasked

Left

MaxLength

Modified

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ReadOnly

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

Text

Top

Visible

Width


 CLX Reference

TMaskEdit Events

TMaskEdit	Alphabetically	Legend

Derived from TCustomEdit

OnChange

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TMaskEdit Events

TMaskEdit	By Object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TMaskEdit Methods

TMaskEdit	Alphabetically	Legend

Derived from TCustomMaskEdit

Clear

Create

CutToClipboard

GetTextLen

PasteFromClipboard

ValidateEdit

Derived from TCustomEdit

ClearSelection

CopyToClipboard

GetSelTextBuf

SelectAll

SetSelTextBuf

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TMaskEdit Methods

TMaskEdit	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

PasteFromClipboard

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSelTextBuf

SetSubComponent

Show

Update

UpdateAction

UpdateControlState

ValidateEdit


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomEdit

TCustomMaskEdit

TMaskEdit


TMemIniFile
 CLX 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. An INI file stores information in logical groupings, called “sections.” Within each section, actual data values are stored in named keys. Keys take the form:

<keyname>=<value>

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.


 CLX Reference

TMemIniFile properties

TMemIniFile	Alphabetically	Legend

In TMemIniFile

CaseSensitive

Derived from TCustomIniFile

FileName


 CLX Reference

TMemIniFile properties

TMemIniFile	By object	Legend

CaseSensitive

FileName


TMemIniFile.CaseSensitive
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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.


TMemIniFile.DeleteKey
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TMemIniFile.ReadSection

TMemIniFile	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.

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
 CLX Reference

TMemIniFile.ReadSections

TMemIniFile	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.

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

 TMemo

Hierarchy	Properties	Methods	Events	Using TMemo	See also

TMemo is a wrapper for a multiline edit control.

Unit

QStdCtrls

Description

Use TMemo to put a standard 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.


 CLX Reference

TMemo properties

TMemo	Alphabetically	Legend

Derived from TCustomMemo

Alignment

CaretPos

Handle

HMargin

Lines

MaxLength

Modified

ReadOnly

ScrollBars

Selection

SelLength

SelStart

SelText

Text

TextWidth

WantReturns

WantTabs

WordWrap

WrapAtValue

WrapBreak

WrapMode

Derived from TFrameControl

BorderStyle

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TMemo Properties

TMemo	By Object	Legend

Action

Align

Alignment

Anchors

BorderStyle

BoundsRect

Brush

CaretPos

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HMargin

Left

Lines

MaxLength

Modified

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ReadOnly

ScrollBars

Selection

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

Text

TextWidth

Top

Visible

WantReturns

WantTabs

Width

WordWrap

WrapAtValue

WrapBreak

WrapMode


 CLX Reference

TMemo events

TMemo	Alphabetically	Legend

Derived from TCustomMemo

OnChange

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TMemo Events

TMemo	By Object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TMemo methods

TMemo	Alphabetically	Legend

Derived from TCustomMemo

Append

AtEOF

Clear

ClearSelection

CopyToClipboard

Create

CutToClipboard

Destroy

GetTextBuf

GetTextLen

HasSelection

Insert

PasteFromClipboard

SelectAll

UnSelect

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TMemo Methods

TMemo	By Object	Legend

AfterConstruction

Append

Assign

AtEOF

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

HasSelection

Hide

InheritsFrom

InitiateAction

InitInstance

Insert

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

PasteFromClipboard

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

UnSelect

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomEdit

TCustomMemo

TMemo


TMemoryStream
 CLX 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.


 CLX Reference

TMemoryStream properties

TMemoryStream	Alphabetically	Legend

Derived from TCustomMemoryStream

Memory

Derived from TStream

Position

Size


 CLX Reference

TMemoryStream properties

TMemoryStream	By object	Legend

Memory

Position

Size


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TMenu

Hierarchy	Properties	Methods	Events	Using TMenu	See also

TMenu is the base type for menu components such as TMainMenu and TPopupMenu.

Unit

QMenus

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  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.


 CLX Reference

TMenu properties

TMenu	Alphabetically	Legend

In TMenu

AutoHotkeys

Bitmap

Color

Images

Items

Derived from THandleComponent

HandleTHandleComponent

HooksTHandleComponent

ParentWidgetTHandleComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TMenu properties

TMenu	By object	Legend

AutoHotkeys

Bitmap

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Handle

HooksTHandleComponent

Images

Items

Name

Owner

ParentWidgetTHandleComponent

Tag


TMenu.AutoHotkeys
 CLX 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.Bitmap
 CLX Reference

TMenu.Bitmap

TMenu	See also

Designates a bitmap that is drawn for a menu.

property Bitmap: TBitmap;

Description

Use Bitmap to provide a custom image that appears a the menu

Note:	If the ImageIndex property is set and the menu has a non-nil Images property, the image identified by ImageIndex is used instead of Bitmap.


TMenu.Color
 CLX Reference

TMenu.Color

TMenu

Specifies the background color for the Menu.

property Color: TColor;

Description

The Color property determines the background color of the Menu. You can set Color to one of the constants defined in the Graphics unit (such as clBlue), or to an explicit RGB integer value.


TMenu.Images
 CLX 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
 CLX 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.


 CLX Reference

TMenu events

TMenu	Alphabetically	Legend

In TMenu

OnChange


 CLX Reference

TMenu events

TMenu	By object	Legend

OnChange


TMenu.OnChange
 CLX 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).

Note:	OnChange does not occur when the selected menu item changes.


 CLX Reference

TMenu methods

TMenu	Alphabetically	Legend

In TMenu

Create

Destroy

DoChange

FindItem

GetChildren

IsShortCut

Loaded

MenuChanged

MenuDataHandle

Notification

PaletteChanged

SetBitmap

SetChildOrder

SetForm

Derived from THandleComponent

HandleAllocated

HandleNeeded

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


 CLX Reference

TMenu methods

TMenu	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoChange

ExecuteAction

FieldAddress

FindComponent

FindItem

Free

FreeInstance

FreeNotification

GetChildren

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleAllocated

HandleNeeded

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

IsShortCut

Loaded

MenuChanged

MenuDataHandle

MethodAddress

MethodName

NewInstance

Notification

PaletteChanged

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetBitmap

SetChildOrder

SetForm

SetSubComponent

UpdateAction


TMenu.Create
 CLX 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
 CLX 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.DoChange
 CLX 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.FindItem
 CLX Reference

TMenu.FindItem

TMenu	See also

Locates and returns a menu item.

type TFindItemKind = (fkID, 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, 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

fkID	Menu item ID matches the Value parameter.

fkHandle	Pop-up menu handle matches the Value parameter.

fkShortCut	Menu shortcut key code matches the Value parameter.


TMenu.GetChildren
 CLX 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.IsShortCut
 CLX Reference

TMenu.IsShortCut

TMenu	See also

Dispatches a key  if it represents a shortcut key for an item in the menu.

function IsShortCut(Key: Integer; Shift: TShiftState; const KeyText: WideString): Boolean; virtual;

Description

IsShortCut is called automatically when the user presses a key while the menu has focus. It allows the menu to dispatch shortcut keys and bypass the standard keystroke processing (OnKeyDown, OnKeyPress, and OnKeyUp events).

Key is the key code for the key the user pressed.

Shift indicates the state of the Shift, Ctrl, and Alt keys.

KeyText is the character specified by the pressed key.

If a shortcut for the key exists, IsShortCut executes the appropriate command and returns True. Otherwise IsShortCut returns False.


TMenu.Loaded
 CLX 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
 CLX 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.MenuDataHandle
 CLX Reference

TMenu.MenuDataHandle

TMenu	See also

Returns the handle to the underlying widget that manages the contents of the menu.

function MenuDataHandle: QMenuDataH; virtual; abstract;

Description

MenuDataHandle is used internally to fetch the handle for the widget that manages menu content. It supplies the handle that is assigned to the MenuData property of the top-level menu item.


TMenu.Notification
 CLX 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.PaletteChanged
 CLX Reference

TMenu.PaletteChanged

TMenu	See also

Responds when the palette associated with this menu changes.

procedure PaletteChanged(Sender: TObject); virtual;

Description

TMenu assigns PaletteChanged as the OnChange event handler for the palette that defines the colors available to this menu. PaletteChanged notifies the underlying widget when the palette changes, so that it can adjust to the changes in the palette.


TMenu.SetBitmap
 CLX Reference

TMenu.SetBitmap

TMenu	See also

Assigns the bitmap specified in the Bitmap property of the menu object to the Bitmap property of the palette associated with the menu object.

procedure SetBitmap; override;

Description

SetBitmap is called automatically when the bitmap assigned to the Bitmap property of the menu is changed. SetBitmap is used internally and should never be called directly.


TMenu.SetForm
 CLX Reference

TMenu.SetForm

TMenu	See also

Reparents the menu to the form specified in the Value parameter.

procedure SetForm(Value: TObject);

Description

Use SetForm to change the menu's parent widget to the form specified in the Value parameter. If the object passed in through the Value parameter is not a TCustomForm or one of its decendents, an EMenuError exception is raised.


TMenu.SetChildOrder
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

THandleComponent

TMenu


TMenuActionLink
 CLX Reference

TMenuActionLink

Hierarchy	Properties	Methods	Events

TMenuActionLink links menu item clients to the corresponding menu action.

Unit

QMenus

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


 CLX Reference

TMenuActionLink properties

TMenuActionLink	Alphabetically	Legend

Derived from TBasicActionLink

Action


 CLX Reference

TMenuActionLink properties

TMenuActionLink	By object	Legend

Action


 CLX Reference

TMenuActionLink events

TMenuActionLink	Alphabetically	Legend

Derived from TBasicActionLink

OnChange


 CLX Reference

TMenuActionLink events

TMenuActionLink	By object	Legend

OnChange


 CLX Reference

TMenuActionLink methods

TMenuActionLink	Alphabetically	Legend

In TMenuActionLink

AssignClient

IsCaptionLinked

IsCheckedLinked

IsEnabledLinked

IsHelpLinked

IsHintLinked

IsImageIndexLinked

IsOnExecuteLinked

IsShortCutLinked

IsVisibleLinked

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


 CLX 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

IsCaptionLinked

IsCheckedLinked

IsEnabledLinked

IsHelpLinked

IsHintLinked

IsImageIndexLinked

IsOnExecuteLinked

IsShortCutLinked

IsVisibleLinked

MethodAddress

MethodName

NewInstance

SafeCallException

SetCaption

SetChecked

SetEnabled

SetHelpContext

SetHelpKeyword

SetHelpType

SetHint

SetImageIndex

SetOnExecute

SetShortCut

SetVisible

Update


TMenuActionLink.AssignClient
 CLX 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.IsCaptionLinked
 CLX 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
 CLX 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
 CLX 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.IsHelpLinked
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.SetCaption
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TMenuItem

Hierarchy	Properties	Methods	Events	Using TMenuItem	See also

TMenuItem describes the properties of an item in a menu.

Unit

QMenus

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.


 CLX Reference

TMenuItem properties

TMenuItem	Alphabetically	Legend

In TMenuItem

Action

AutoHotkeys

Bitmap

Caption

Checked

Count

Enabled

GroupIndex

Handle

Hint

ID

ImageIndex

Items

MenuIndex

Parent

RadioItem

ShortCut

Visible

Derived from THandleComponent

HelpContext

HelpKeyword

HelpType

Hooks

ParentWidget

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TMenuItem properties

TMenuItem	By object	Legend

Action

AutoHotkeys

Bitmap

Caption

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Count

DesignInfo

Enabled

GroupIndex

Handle

HelpContext

HelpKeyword

HelpType

Hint

Hooks

ID

ImageIndex

Items

MenuIndex

Name

Owner

Parent

ParentWidget

RadioItem

ShortCut

Tag

Visible


TMenuItem.Action
 CLX 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.AutoHotkeys
 CLX 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.Bitmap
 CLX 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.

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.

Note:	You can’t assign a bitmap to a top-level menu item in a main menu.


TMenuItem.Caption
 CLX Reference

TMenuItem.Caption

TMenuItem	See also 	Example

Specifies the text of the menu item.

property Caption: WideString;

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
 CLX 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.Count
 CLX 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.Enabled
 CLX 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
 CLX 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.

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.

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
 CLX Reference

TMenuItem.Handle

TMenuItem	See also

Provides access to the unique 4-byte identifier that represents the instance of the underlying Qt QPopupMenu object.

property Handle: QPopupMenuH;

Description

Use Handle to return a typed pointer to the instance of the underlying Qt QPopupMenu object. This Handle can be used when making low-level function calls into the Qt shared libraries, where the function call requires an instance pointer to a QPopupMenu object.


TMenuItem.Hint
 CLX 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.ID
 CLX Reference

TMenuItem.ID

TMenuItem	See also

Returns the menu item identifier.

property ID: Integer;

Description

Read ID to obtain the menu item identifier for the menu item. Menu item identifiers (negative integers) are automatically generated and are guaranteed to be unique within the entire application. Use the ID property when making low-level function calls into the Qt shared libraries and the function call requires a menu item identifier.


TMenuItem.ImageIndex
 CLX 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.

Note:	This property is not stored with the menu item if it is supplied by a TAction object.


TMenuItem.Items
 CLX 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
 CLX 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
 CLX 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
 CLX 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 check mark 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.


TMenuItem.ShortCut
 CLX 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.Visible
 CLX 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.


 CLX Reference

TMenuItem events

TMenuItem	Alphabetically	Legend

In TMenuItem

OnClick

OnHighlighted

OnShow


 CLX Reference

TMenuItem events

TMenuItem	By object	Legend

OnClick

OnHighlighted

OnShow


TMenuItem.OnClick
 CLX Reference

TMenuItem.OnClick

TMenuItem	See also

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.Note:	This event handler is not stored with the menu item if it is supplied by a TAction object.


TMenuItem.OnHighlighted
 CLX Reference

TMenuItem.OnHighlighted

TMenuItem	See also

Occurs when the menu item is highlighted.

property OnHighlighted: TNotifyEvent;

Description

Write an OnHighlighted event handler to implement the desired behavior when a menu item is highlighted.


TMenuItem.OnShow
 CLX Reference

TMenuItem.OnShow

TMenuItem

Occurs just before the popup menu is displayed.

property OnShow: TNotifyEvent;

Description

Write an OnShow event handler to perform special processing when the popup menu is  about to be shown.


 CLX Reference

TMenuItem methods

TMenuItem	Alphabetically	Legend

In TMenuItem

Add

Clear

Click

Create

Delete

Destroy

Find

GetParentComponent

GetParentMenu

HasBitmap

HasParent

IndexOf

InitiateAction

Insert

InsertNewLineAfter

InsertNewLineBefore

IsLine

MenuData

Remove

RethinkHotkeys

Derived from THandleComponent

HandleAllocated

HandleNeeded

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetParentMenu

HandleAllocated

HandleNeeded

HasBitmap

HasParent

IndexOf

InheritsFrom

InitiateAction

InitInstance

Insert

InsertComponent

InsertNewLineAfter

InsertNewLineBefore

InstanceSize

IsImplementorOf

IsLine

MenuData

MethodAddress

MethodName

NewInstance

ReferenceInterface

Remove

RemoveComponent

RemoveFreeNotification

RethinkHotkeys

SafeCallException

SetSubComponent

UpdateAction


TMenuItem.Add
 CLX 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
 CLX 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
 CLX 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.

Component writers can override click to provide a different response when the user selects the menu item.


TMenuItem.Create
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TMenuItem.Find

TMenuItem	See also

Locates a menu item in the Items property array given its caption or handle.

function Find(ACaption: string): TMenuItem; overload;

function Find(AHandle: QMenuItemH): TMenuItem; overload;

Description

Use the first form of 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.

Use the second form of Find to locate the menu item in the Items property array with the handle specified by the AHandle parameter.

Find returns the first menu item in the Items property array with the specified caption or handle, or, if no item is found, nil.


TMenuItem.GetParentComponent
 CLX 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 CLX 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
 CLX 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.HasBitmap
 CLX Reference

TMenuItem.HasBitmap

TMenuItem	See also

Indicates whether the menu item has a bitmap that appears next to the text.

function HasBitmap: Boolean;

Description

HasBitmap returns True if the menu item has a bitmap that appears next to the text, False if the Bitmap property is not set or if it is set to an empty bitmap.


TMenuItem.HasParent
 CLX 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 CLX objects to determine when another object is responsible for writing a component to a stream.


TMenuItem.IndexOf
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.MenuData
 CLX Reference

TMenuItem.MenuData

TMenuItem

Represents the widget of a menu item that contains subitems.

function MenuData: QMenuDataH;

Description

MenuData represents widget that contains the menu data. For example, a File menu item might contain items such as Open, Close, and Exit. The widget that lists the items under the File menu is the MenuData. This is primarily for low-level programming and not recommended for use in application development.

QMenuDataH is a handle to the underlying Qt widget.


TMenuItem.Remove
 CLX 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
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

THandleComponent

TMenuItem


TDataPacketFormat type
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TMimeSourceFactory
 CLX Reference

TMimeSourceFactory

Hierarchy	Properties	Methods	See also

Repository for data type information.

Unit

QComCtrls

Description

A TMimeSourceFactory object is a repository for date type information. Rich text controls use these objects to manage MIME data relating to graphic file types and document types.

TMimeSourceFactory is a wrapper for the Qt class, QMimeSourceFactory.


 CLX Reference

TMimeSourceFactory Properties

TMimeSourceFactory	Alphabetically	Legend

In TMimeSourceFactory

FilePath

Handle


 CLX Reference

TMimeSourceFactory Properties

TMimeSourceFactory	By Object	Legend

FilePath

Handle


TMimeSourceFactory.FilePath
 CLX Reference

TMimeSourceFactory.FilePath

Data search path.

property FilePath: TStrings;

Description

FilePath species the directories to be search for file type information.


TMimeSourceFactory.Handle
 CLX Reference

TMimeSourceFactory.Handle

Provides access to the underlying Qt object.

property Handle: QMimeSourceFactoryH;

Description

The Handle property returns a pointer to the underlying QMimeSourceFactory object.


 CLX Reference

TMimeSourceFactory Methods

TMimeSourceFactory	Alphabetically	Legend

In TMimeSourceFactory

AddDataToFactory

AddImageToFactory

AddPixmapToFactory

AddTextToFactory

GetMimeSource

RegisterMimeType

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


 CLX Reference

TMimeSourceFactory Methods

TMimeSourceFactory	By Object	Legend

AddDataToFactory

AddImageToFactory

AddPixmapToFactory

AddTextToFactory

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetMimeSource

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RegisterMimeType

SafeCallException


TMimeSourceFactory.AddDataToFactory
 CLX Reference

TMimeSourceFactory.AddDataToFactory

TMimeSourceFactory

Add a MIME data item.

procedure AddDataToFactory(const Name: WideString; Data: QMimeSourceH);

Description

AddDataToFactory specifies that Data represents the MIME data associated with Name.


TMimeSourceFactory.AddImageToFactory
 CLX Reference

TMimeSourceFactory.AddImageToFactory

TMimeSourceFactory

Add a MIME image item.

procedure AddImageToFactory(const Name: WideString; Data: QImageH);

Description

AddImageToFactory specifies that Data represents the MIME image associated with Name.


TMimeSourceFactory.AddPixmapToFactory
 CLX Reference

TMimeSourceFactory.AddPixmapToFactory

TMimeSourceFactory

Add a MIME pixmap item.

procedure AddPixmapToFactory(const Name: WideString; Data: QPixmapH);

Description

AddPixmapToFactory specifies that Data represents the MIME pixmap associated with Name.


TMimeSourceFactory.AddTextToFactory
 CLX Reference

TMimeSourceFactory.AddTextToFactory

TMimeSourceFactory

Add a MIME data item.

procedure AddTextToFactory(const Name: WideString; Data: string);

Description

AddTextToFactory specifies that Data represents the MIME text associated with Name.


TMimeSourceFactory.GetMimeSource
 CLX Reference

TMimeSourceFactory.GetMimeSource

TMimeSourceFactory

Get a MIME data item.

function GetMimeSource(const MimeType: WideString): QMimeSourceH;

Description

GetMimeSource returns the MIME data associated with MimeType.


TMimeSourceFactory.RegisterMimeType
 CLX Reference

TMimeSourceFactory.RegisterMimeType

TMimeSourceFactory

Get a MIME data item.

procedure RegisterMimeType(const FileExt: WideString; const MimeType: string);

Description

RegisterMimeType specifies that FileExt is a file name extension associated with MimeType.


Hierarchy

TObject

TPersistent

TMimeSourceFactory


TMimeSource
 CLX Reference

TMimeSource

Hierarchy	Properties	Methods	See also

TMimeSource is a wrapper for a Qt QMimeSource object.

Unit

QTypes

Description

Use TMimeSource to read data from a Qt mime source. A mime source represents a stream of data, which it can supply in one or more MIME encodings.

To use TMimeSource, you must first associate it with a Qt mime source by setting the Handle property (or providing a Qt mime source handle to the constructor). Once the Handle property is set, you can query the Mime encodings that the mime source supports by calling Provides or SupportedFormats method. You can then write the data from the mime source to a stream by calling the SaveToStream method.


 CLX Reference

TMimeSource properties

TMimeSource	Alphabetically	Legend

In TMimeSource

Handle


 CLX Reference

TMimeSource properties

TMimeSource	By object	Legend

Handle


TMimeSource.Handle
 CLX Reference

TMimeSource.Handle

TMimeSource	See also

Specifies the unique 4-byte identifier that represents the instance of a Qt QMimeSource object.

property Handle: QMimeSourceH;

Description

The Handle property is a unique 4-byte identifier that represents the instance of a QT QMimeSource object.

Use Handle to obtain a pointer to the instance of the underlying QMimeSource object. This Handle can be used when making low-level function calls into the QT shared libraries, where the function call requires an instance pointer to a QMimeSource object.

Set Handle to make the TMimeSource object represent the QMimeSource object indicated by the MimeSource handle. Setting Handle releases the current QMimeSource object. If the handle to the QMimeSource object was owned by the TMimeSource object, the QMimeSource object is destroyed. Setting Handle does not automatically assume ownership of the QMimeSource object. To assume ownership, call OwnHandle after setting the Handle.


 CLX Reference

TMimeSource methods

TMimeSource	Alphabetically	Legend

In TMimeSource

Create

Destroy

OwnHandle

Provides

ReleaseHandle

SaveToStream

SupportedFormats

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


 CLX Reference

TMimeSource methods

TMimeSource	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

OwnHandle

Provides

ReleaseHandle

SafeCallException

SaveToStream

SupportedFormats


TMimeSource.Create
 CLX Reference

TMimeSource.Create

TMimeSource	See also

Instantiates and initializes a TMimeSource object.

constructor Create(AHandle: QMimeSourceH = nil);

Description

Call Create to create a TMimeSource object.

AClient is the handle (pointer) to a QMimeSource object that this TMimeSource represents. It becomes the value of the Handle property. You must supply a mime source with a handle before you can use it.

The handle supplied as the AHandle parameter is not owned by the TMimeSource object. That is, the underlying QMimeSource object is not freed when you free the TMimeSource object. To convert this to an owned object (one that is freed when you free the TMimeSource instance), call the OwnHandle method.


TMimeSource.Destroy
 CLX Reference

TMimeSource.Destroy

TMimeSource	See also

Destroys an instance of a TMimeSource object.

destructor Destroy; override;

Description

To free a TMimeSource instance, do not call the destructor directly. Call Free instead. Free checks that the link is not nil, and only then invokes the destructor.

Destroy checks whether the underlying QMimeSource object is an owned instance. If so, it frees the underlying QMimeSource object as well.


TMimeSource.OwnHandle
 CLX Reference

TMimeSource.OwnHandle

TMimeSource	See also

Causes TMimeSource to assume ownership of the underlying QMimeSource object.

procedure OwnHandle;

Description

Call OwnHandle to assume ownership of the underlying QMimeSource instance. When TMimeSource owns the underlying QMimeSource object, it frees that object when you free the TMimeSource instance. If TMimeSource does not own the underlying QMimeSource object, then freeing the TMimeSource instance leaves the underlying QMimeSource instance intact.

To relinquish ownership after calling OwnHandle, use the ReleaseHandle method.


TMimeSource.Provides
 CLX Reference

TMimeSource.Provides

TMimeSource	See also

Indicates whether the mime source can write its data in a specified MIME format.

function Provides(const Format: string): Boolean;

Description

Call Provides to determine whether the mime source can write its data using a specified MIME format.

Format is the name of a MIME type, such as ‘text/plain’.

If Provides returns True, the SaveToStream method can write the mime source’s data to a stream using the specified format. If Provides returns False, then calling the SaveToStream method while specifying the same format will do nothing.


TMimeSource.ReleaseHandle
 CLX Reference

TMimeSource.ReleaseHandle

TMimeSource	See also

Relinquishes ownership of the underlying QMimeSource object.

procedure ReleaseHandle;

Description

Use ReleaseHandle to prevent the TMimeSource object from deleting the underlying QMimeSource object when it is freed.


TMimeSource.SaveToStream
 CLX Reference

TMimeSource.SaveToStream

TMimeSource	See also

Writes the data from the mime source to a stream.

function SaveToStream(const Format: string; Stream: TStream): Boolean;

Description

Call SaveToStream to extract data from the mime source in a specified format.

Format is the format in which to write the data. It is a MIME-type descriptor such as ‘text/plain’. Use the SupportedFormats method to obtain a list of available values. Use the Provides method to test whether a format is available before calling SaveToStream.

Stream is a stream object to which the data is written.

SaveToStream returns True if it successfully wrote the data, False if it could not write the data using the specified format.


TMimeSource.SupportedFormats
 CLX Reference

TMimeSource.SupportedFormats

TMimeSource	See also

Fills a string list with the MIME-type descriptors of all formats in which the mime source can write its data.

procedure SupportedFormats(List: TStrings);;

Description

Use SupportedFormats to obtain a list of all the formats that this mime source can use when writing its data.

List is an existing TStrings descendant.

For every format it can use in the SaveToStream method, SupportedFormats adds the MIME-type descriptor to List.

Note:	SupportedFormats does not clear the string list before adding the MIME-type descriptors of supported formats.


Hierarchy

TObject

TPersistent

TMimeSource


TMouse
 CLX Reference

TMouse

Hierarchy	Properties	Methods	See also

TMouse surfaces information about the mouse and specifies how the application responds to mouse messages.

Unit

QControls

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.


 CLX Reference

TMouse Properties

TMouse	Alphabetically	Legend

In TMouse

Capture

CursorPos

DragImmediate

DragThreshold


 CLX Reference

TMouse Properties

TMouse	By Object	Legend

Capture

CursorPos

DragImmediate

DragThreshold


TMouse.Capture
 CLX Reference

TMouse.Capture

TMouse	See also

Specifies the handle of the widget  that is capturing mouse events.

property Capture: TControl;

Description

Read Capture to get the control that receives all mouse messages. This is the control that is currently responding to the user’s mouse actions.

Set Capture to a control to let it “capture” the mouse. When a control 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 so that it receives subsequent mouse messages until the mouse button is released.


TMouse.CursorPos
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TMouse methods

TMouse	Alphabetically	Legend

In TMouse

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


 CLX 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


TMouse.Create
 CLX 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
 CLX 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.


Hierarchy

TObject

TMouse


TObjectQueue
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TObjectQueue.Push

TObjectQueue	See also

Adds an object to the end of the queue.

function Push(AObject: TObject);

Description

Call Push to add an object to the queue.

To retrieve objects added with Push, call Pop or Peek.


Hierarchy

TObject

TOrderedList

TQueue

TObjectQueue


TObjectStack
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TObjectStack.Push

TObjectStack	See also

Adds an object to the top of the stack.

procedure Push(AObject: TObject);

Description

Call Push to add an object to the stack.

To retrieve objects added with Push, call Pop or Peek.


Hierarchy

TObject

TOrderedList

TStack

TObjectStack


TObject
 CLX Reference

TObject

Methods	See also

TObject is the ultimate ancestor of all CLX objects and components.

Unit

System

Description

TObject encapsulates fundamental behavior common to CLX 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 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 (on Windows) or shared objects (on Linux).

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 IInterface, can be supplied as the IID parameter since the compiler will replace the interface with the associated GUID.

Some CLX 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
 CLX 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.


TObject.GetInterfaceTable
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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, used for COM exception handling, is inoperative in CLX.


TOpenDialog
 CLX Reference

 TOpenDialog

Hierarchy	Properties	Methods	Events	Using TOpenDialog	See also

TOpenDialog displays a file-selection dialog.

Unit

QDialogs

Description

TOpenDialog displays a modal  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.


 CLX Reference

TOpenDialog properties

TOpenDialog	Alphabetically	Legend

In TOpenDialog

DefaultExt

FileName

Files

Filter

FilterIndex

Handle

HistoryList

InitialDir

Options

In TQtDialog

NativeFlags

UseNativeDialog

Derived from TDialog

Height

HelpContext

HelpKeyword

HelpType

Position

Title

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TOpenDialog properties

TOpenDialog	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DefaultExt

DesignInfo

FileName

Files

Filter

FilterIndex

Handle

Height

HelpContext

HelpKeyword

HelpType

HistoryList

InitialDir

Name

NativeFlags

Options

Owner

Position

Tag

Title

UseNativeDialog

Width


TOpenDialog.DefaultExt
 CLX 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.


TOpenDialog.FileName
 CLX 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
 CLX 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
 CLX 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
 CLX 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:Handle
 CLX Reference

TOpenDialog.Handle

TOpenDialog	See also

Provides access to the unique 4-byte identifier that represents the instance of a Qt QFileDialog object.

property Handle: QClxFileDialogH;

Description

The Handle property provides access to the unique 4-byte identifier that represents the instance of a Qt QFileDialog object.

Use Handle to return a typed pointer to the instance of the underlying QFileDialog object. This Handle can be used when making low-level function calls into the Qt shared libraries, where the function call requires an instance pointer to a QFileDialog object.


TOpenDialog.HistoryList
 CLX Reference

TOpenDialog.HistoryList

TOpenDialog	See also

Maintains a list of previously selected files. (Obsolete.)

property HistoryList: TStrings;

Description

HistoryList is maintained for compatibility with Delphi.


TOpenDialog.InitialDir
 CLX 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 /home/company/docs directory, set the value if InitialDir to /home/company/docs.

If no value is assigned to InitialDir, or if the specified directory does not exist, the initial directory is the current working directory.


TOpenDialog.Options
 CLX Reference

TOpenDialog.Options

TOpenDialog	See also

Determines the appearance and behavior of the file-selection dialog.

type

TOpenOption = (ofShowHidden, ofOverwritePrompt, ofNoChangeDir, ofAllowMultiSelect, ofExtensionDifferent, ofPathMustExist, ofFileMustExist, ofEnableSizing, ofViewDetail);

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

ofShowHidden	Includes in the display files marked as hidden.

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.)

ofNoChangeDir	After the user clicks OK, resets the current directory to whatever it was before the file-selection dialog opened.

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).

ofEnableSizing	 Lets the  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.

ofViewDetail	Includes in the files list attribute details about each file, like creation date and access privileges.


TOpenDialog.Title
 CLX 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".


 CLX Reference

TOpenDialog events

TOpenDialog	Alphabetically	Legend

In TOpenDialog

OnCanClose

OnFileAdd

OnFolderChange

OnSelected

Derived from TDialog

OnClose

OnShow


 CLX Reference

TOpenDialog events

TOpenDialog	By object	Legend

OnCanClose

OnClose

OnFileAdd

OnFolderChange

OnSelected

OnShow


TOpenDialog.OnCanClose
 CLX 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.


TOpenDialog:OnFileAdd
 CLX Reference

TOpenDialog.OnFileAdd

TOpenDialog

Occurs when the user adds a file to the current list of selected files.

type

  TFileAddEvent = procedure(Sender: TObject; const Filename: string; const Readable,Writeable, Executable: Boolean; var CanAdd: Boolean) of object;

property OnSelected: TFileAddEvent;

Description

Write an OnFileAdd event handler to take action when the user adds a file to the current list of selected files.


TOpenDialog.OnFolderChange
 CLX 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:OnSelected
 CLX Reference

TOpenDialog.OnSelected

TOpenDialog	See also

Occurs when the user selects a file.

type

  TFileSelectEvent = procedure(Sender: TObject; const Filename: String) of object;

property OnSelected: TFileSelectEvent;

Description

The OnSelected event occurs when the user selects a file from the displayed list.


 CLX Reference

TOpenDialog methods

TOpenDialog	Alphabetically	Legend

In TOpenDialog

Create

Destroy

Refresh

In TQtDialog

Execute

HandleAllocated

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleAllocated

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TOpenDialog.Create
 CLX 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
 CLX 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:Refresh
 CLX Reference

TOpenDialog::.Refresh

TOpenDialog	See also

Refeshes the files list.

procedure Refresh;

Description

Call Refresh to refresh the list of files displayed in the TOpenDialog list. This updates the list to reflect files that have been added or deleted by other users or other applications.


Hierarchy

TObject

TPersistent

TComponent

TDialog

TQtDialog

TOpenDialog


TOrderedList
 CLX 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.


 CLX Reference

TOrderedList properties

TOrderedList	Alphabetically	Legend

In TOrderedList

List


 CLX Reference

TOrderedList properties

TOrderedList	By object	Legend

List


TOrderedList.List
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TOrderedList.Create

TOrderedList

Creates a TOrderedList instance.

constructor Create;

Description

Create generates a new list.


TOrderedList.Destroy
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TOrderedList.Push

TOrderedList	See also

Adds an item to the list.

procedure Push(AItem: Pointer);

Description

Call Push to add an item to the list.

To retrieve items added with Push, call Pop or Peek.


TOrderedList.PushItem
 CLX 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


TOwnedCollection
 CLX 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.


 CLX Reference

TOwnedCollection properties

TOwnedCollection	Alphabetically	Legend

Derived from TCollection

Count

ItemClass

Items


 CLX Reference

TOwnedCollection properties

TOwnedCollection	By object	Legend

Count

ItemClass

Items


 CLX 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


 CLX 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
 CLX 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
 CLX 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

QComCtrls

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.


 CLX Reference

TPageControl Properties

TPageControl	Alphabetically	Legend

In TPageControl

ActivePage

ActivePageIndex

PageCount

Pages

Derived from TCustomTabControl

HotImages

HotTrack

HotTrackColor

Images

MultiLine

RaggedRight

RowCount

ShowFrame

Style

TabHeight

TabWidth

Derived from TCustomControl

Canvas

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TPageControl Properties

TPageControl	By Object	Legend

Action

ActivePage

ActivePageIndex

Align

Anchors

BoundsRect

Brush

Canvas

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HotImages

HotTrack

HotTrackColor

Images

Left

MultiLine

Name

Owner

PageCount

Pages

Parent

ParentFont

ParentShowHint

ParentWidget

PopupMenu

RaggedRight

RowCount

ShowFrame

ShowHint

Showing

Style

TabHeight

TabOrder

TabStop

TabWidth

Tag

Top

Visible

Width


TPageControl.ActivePage
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TPageControl Events

TPageControl	Alphabetically	Legend

In TPageControl

OnChange

OnPageChanging

Derived from TCustomTabControl

OnChanging

OnGetImageIndex

Derived from TWidgetControl

OnEnter

OnExit

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDrag


 CLX Reference

TPageControl Events

TPageControl	By Object	Legend

OnChange

OnChanging

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnGetImageIndex

OnMouseDown

OnMouseMove

OnMouseUp

OnPageChanging

OnResize

OnStartDrag


TPageControl.OnChange
 CLX Reference

TPageControl.OnChange

TCustomTabControl

Occurs after a new tab is selected.

property OnChange: TNotifyEvent;


TPageControl.OnPageChanging
 CLX Reference

TPageControl.OnPageChanging

TCustomTabControl

Occurs immediately before a new page is selected.

TPageChangingEvent = procedure(Sender: TObject; NewPage: TTabSheet; var AllowChange: Boolean) ofobject;

property OnPageChanging: TPageChangingEvent;

Description

Write an OnPageChanging event handler to take specific action immediately before the selected page changes. Set the AllowChange parameter to False to prevent the change.

Use an OnPageChanging event handler to prevent the user from leaving a tab setting until certain conditions have been met. An OnPageChanging event handler can also be used to save information about the current state of the control before it is changed by a new selection.


 CLX Reference

TPageControl Methods

TPageControl	Alphabetically	Legend

In TPageControl

CanShowTab

Change

Create

Destroy

FindNextPage

GetChildren

SelectNextPage

SetChildOrder

ShowControl

UpdateActivePage

Derived from TCustomTabControl

BeginUpdate

EndUpdate

IndexOfTabAt

ScrollTabs

TabRect

Derived from TCustomControl

Invalidate

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TPageControl Methods

TPageControl	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BeginUpdate

BringToFront

Broadcast

CanFocus

CanShowTab

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

EndUpdate

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindNextPage

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetChildren

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

IndexOfTabAt

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollTabs

SelectNextPage

SendToBack

SetBounds

SetChildOrder

SetFocus

SetSubComponent

Show

ShowControl

TabRect

Update

UpdateAction

UpdateActivePage

UpdateControlState


TPageControl.CanShowTab
 CLX 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
 CLX 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
 CLX 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
 CLX 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.FindNextPage
 CLX 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
 CLX 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.SelectNextPage
 CLX 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
 CLX 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
 CLX 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
 CLX 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

TWidgetControl

TCustomControl

TCustomTabControl

TPageControl


TPalette
 CLX Reference

TPalette

Hierarchy	Properties	Methods	See also

TPalette encapsulates the Qt Palette object.

Unit

QGraphics

Description

TPalette encapsulates the Qt shared library's Palette object (QPalette) and is used for the different color states of widgets and brush colors.


 CLX Reference

TPalette properties

TPalette	Alphabetically	Legend

In TPalette

BaseColor

Handle

Owned


 CLX Reference

TPalette properties

TPalette	By object	Legend

BaseColor

Handle

Owned


TPalette.BaseColor
 CLX Reference

TPalette.BaseColor

TPalette	See also

Specifies the base color, which is used to initialize the symbolic color constants for the palette.

property BaseColor: TColor;

Description

BaseColor sets the base color that is used to define the symbolic TColor constants in this palette. Thus, for example, clForeground and clBackground are defined in terms of BaseColor.


TPalette.Handle
 CLX Reference

TPalette.Handle

TPalette	See also

Provides access to the unique 4-byte identifier that represents the instance of a Qt QPalette object.

property Handle: QPaletteH;

Description

The Handle property provides access to the unique 4-byte identifier that represents the instance of a QT QPalette object.

Use Handle to return a typed pointer to the instance of the underlying QPalette object. This Handle can be used when making low-level function calls into the Qt shared libraries, where the function call requires an instance pointer to a QPalette object.


TPalette.Owned
 CLX Reference

TPalette.Owned

TPalette	See also

Specifies whether the TPalette owns it’s underlying QPalette object.

property Owned: Boolean;

Description

Each TPalette instance shares the same underlying QPalette object, whenever possible. When you create a new TPalette object, it uses the same QPalette object as the application’s palette. Owned is initially False, to reflect the fact that this palette does not own its own underlying QPalette.

When you change the palette using the properties or methods of TPalette, the TPalette instance creates its own separate QPalette object and sets Owned to True.


 CLX Reference

TPalette Events

TPalette	By Object	Legend

In TPalette

OnChange


 CLX Reference

TPalette Events

TPalette	By Object	Legend

OnChange


TPalette.OnChange
 CLX Reference

TPalette.OnChange

TCustomEdit	See also

Occurs after the palette changes.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to take specific action after the palette changes. This event provides the first opportunity to respond to modifications of the palette.


 CLX Reference

TPalette methods

TPalette	Alphabetically	Legend

In TPalette

BeginUpdate

ColorGroup

Create

Destroy

EndUpdate

GetBrushPixmap

GetColor

SetBitmap

SetColor

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


 CLX Reference

TPalette methods

TPalette	By object	Legend

AfterConstruction

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ColorGroup

Create

DefaultHandler

Destroy

Dispatch

EndUpdate

FieldAddress

Free

FreeInstance

GetBrushPixmap

GetColor

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SetBitmap

SetColor


TPalette.Create
 CLX Reference

TPalette.Create

TPalette	See also

Creates an instance of TPalette.

constructor Create; virtual;

Description

Call Create to instantiate a TPalette object at runtime. Each TPalette instance is originally created as an unowned palette, sharing the same QPalette instance as the application palette. When you change the palette using the TPalette properties and methods, however, TPalette creates its own QPalette object to represent the unique configuration of this palette.


TPalette.Destroy
 CLX Reference

TPalette.Destroy

TPalette	See also

Destroys an instance of TPalette.

destructor Destroy; override;

Description

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


TPalette.BeginUpdate
 CLX Reference

TPalette.BeginUpdate

TPalette	See also

Prevents the updating of the underlying QPalette object until the EndUpdate method is called.

procedure BeginUpdate;

Description

BeginUpdate is called automatically by any property or method that changes the palette. Once the changes are complete, the property or method calls EndUpdate.

When implementing properties or methods that change the palette in descendants of TPalette, call BeginUpdate before the changes are made, and EndUpdate when the changes are complete. Use BeginUpdate to speed up processing and avoid unnecessary calls to the OnChange event handler.

Note:	Calls to BeginUpdate are cumulative; for every call to BeginUpdate there must be a corresponding call to EndUpdate.


TPalette.ColorGroup
 CLX Reference

TPalette.ColorGroup

TPalette	See also

Returns the handle to a color group from the underlying QPalette object.

function ColorGroup(Group: TColorGroup): QColorGroupH;

Description

Call ColorGroup to obtain a color group handle for use with a drawing routine that requires one. The color group provides modifications to the base color and color role to reflect whether a control is active, inactive, or disabled.

Typically, applications do not need to use ColorGroup. Rather, fetch colors constants or brush bitmaps that reflect a particular role and color group using the GetBrushPixmap or GetColor method.


TPalette.EndUpdate
 CLX Reference

TPalette.EndUpdate

TPalette	See also

Re-enables updating of the palette that was turned off with the BeginUpdate method.

procedure EndUpdate;

Description

Use the EndUpdate method to enable palette updating after BeginUpdate has been called. All TPalette properties and methods that change the palette automatically call BeginUpdate and EndUpdate.

Calls to BeginUpdate are cumulative, so calling EndUpdate will only update the palette if every other call to BeginUpdate has already been matched by a call to EndUpdate.


TPalette.GetBrushPixmap
 CLX Reference

TPalette.GetBrushPixmap

TPalette	See also

Returns the handle to a pixmap that is used for the brush when drawing controls that reflect a specified role and group.

function GetBrushPixmap(Group: TColorGroup; Role: TColorRole): QPixmapH;

Description

Call GetBrushPixmap to obtain a pixmap handle for the bitmap of a brush that reflects a specified color group and role.

Typically, applications do not need to use GetBrushPixmap. It is used by component writers who are working directly with Qt widgets.

To change this pixmap, use the SetBitmap method.


TPalette.GetColor
 CLX Reference

TPalette.GetColor

TPalette	See also

Returns a TColor value that reflects a specified color group and role.

function GetColor(Group: TColorGroup; Role: TColorRole): TColor; overload;

type TMappedColor = clActiveHighlightedText..clNormalForeground;

function GetColor(MappedColor: TMappedColor): TColor; overload;

Description

Call GetColor to obtain a TColor value that explicitly codes the RGB values of a color that fills a symbolic role in this palette. The returned value is an RGB value, not one of the symbolic TColor contants.

Group indicates whether the color is for an active, inactive, or disabled control.

Role indicates how the color is used when painting the control.

MappedColor is one of the symbolic TColor constants (in the range from clActiveHighlightedText to clNormalForeground) that encodes the desired group and role.


TPalette.SetBitmap
 CLX Reference

TPalette.SetBitmap

TPalette	See also

Sets the bitmap to use for brushes that reflect a specified color group and role.

procedure SetBitmap(Group: TColorGroup; Role: TColorRole; Bitmap: TBitmap);

Description

Use SetBitmap to assign a bitmap to the brush for a specified color group and role. Once you have set the bitmap, the palette generates a corresponding pixmap, whose handle can be fetched by calling GetBrushPixmap.

Group indicates whether the brush is for an active, inactive, or disabled control.

Role indicates how the brush is used when painting the control.

Bitmap is the bitmap to use for the brush.


TPalette.SetColor
 CLX Reference

TPalette.SetColor

TPalette	See also

Sets the color for a specified role and group.

procedure SetColor(Group: TColorGroup; Role: TColorRole; Color: TColor);

Description

By default, the palette generates colors for each combination of group and role based on the value of the BaseColor property. You can override these colors for any particular group and role by calling SetColor.

Group indicates whether the color is for an active, inactive, or disabled control.

Role indicates how the color is used when painting the control.

Color is the value to use for the specified group and role.


Hierarchy

TObject

TPalette


TPen
 CLX Reference

TPen

Hierarchy	Properties	Methods	Events	Using TPen	See also

TPen is used to draw lines or outline shapes on a canvas.

Unit

QGraphics

Description

TPen encapsulates the Qt shared library's pen object (QPen) and is used to draw lines or outline shapes on a canvas.


 CLX Reference

TPen properties

TPen	Alphabetically	Legend

In TPen

Color

Handle

Mode

Style

Width


 CLX Reference

TPen properties

TPen	By object	Legend

Color

Handle

Mode

Style

Width


TPen.Color
 CLX 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
 CLX Reference

TPen.Handle

TPen	See also

Provides access to the unique 4-byte identifier that represents the instance of a Qt QPen object.

property Handle: QPenH;

Description

The Handle property provides access to the unique 4-byte identifier that represents the instance of a QT QPen object.

Use Handle to return a typed pointer to the instance of the underlying QPen object. This Handle can be used when making low-level function calls into the Qt shared libraries, where the function call requires an instance pointer to a QPen object.

Set Handle to make the TPen object represent the QPen object indicated by the Pen handle. Setting Handle releases the current QPen object. If the handle to the QPen object was owned by the TPen object, the QPen object is destroyed. Setting Handle does not automatically assume ownership of the QPen object. To assume ownership, call OwnHandle after setting the Handle.


TPen.Mode
 CLX 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
 CLX Reference

TPen.Style

TPen	See also 	Example

Determines the style in which the pen draws lines.

type TPenStyle = (psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear);

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).

Note:	Dotted or dashed pen styles are not available when the Width property is not 1.


TPen.Width
 CLX 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.


 CLX Reference

TPen events

TPen	Alphabetically	Legend

Derived from TGraphicsObject

OnChange


 CLX Reference

TPen events

TPen	By object	Legend

OnChange


 CLX Reference

TPen methods

TPen	Alphabetically	Legend

In TPen

Assign

Create

Destroy

OwnHandle

ReleaseHandle

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


 CLX 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

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

OwnHandle

ReleaseHandle

SafeCallException


TPen.Assign
 CLX 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
 CLX Reference

TPen.Create

TPen	See also

Creates an instance of TPen.

constructor Create; overload;

constructor Create(AHandle: QPenH); overload;

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.

Call the second form of the constructor to create a TPen object, based on an existing QPen object, identified by the AHandle parameter, at runtime. The AHandle parameter must be a QPenH handle that points to a valid QPen object. Ownership of the handle is not automatically assumed. To assume ownership of the handle, call the OwnHandle method.


TPen.Destroy
 CLX 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. If the instance of TPen was created using the Create method, Destroy frees the underlying QPen object identified by the Handle property.

If the instance of TPen was created using the Create(AHandle) method Destroy frees the underlying QPen object identified by the Handle property, only if the OwnHandle method was called.


TPen.OwnHandle
 CLX Reference

TPen.OwnHandle

TPen	See also

Cause TPen to assume ownership of the underlying QPen object.

procedure OwnHandle;

Description

Call OwnHandle to assume ownership of the underlying QPen object instance. Use it when you need to accept ownership (or destroy) of the QPen handle.


TPen.ReleaseHandle
 CLX Reference

TPen.ReleaseHandle

TPen	See also

Returns the handle to the underlying QPen object so that the TPen object no longer knows about the handle.

function ReleaseHandle: QPenH;

Description

Use ReleaseHandle to disassociate TPen from the QPen handle. Use it when you need to give a QPen handle to a routine or object that will assume ownership (or destroy) the QPen handle. Calling ReleaseHandle on a handle you do not own does not destroy the handle being released.


Hierarchy

TObject

TPersistent

TGraphicsObject

TPen


TPopupMenu
 CLX Reference

 TPopupMenu

Hierarchy	Properties	Methods	Events	Using TPopupMenu	See also

TPopupMenu encapsulates the properties, methods, and events of a pop-up menu.

Unit

QMenus

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.


 CLX Reference

TPopupMenu properties

TPopupMenu	Alphabetically	Legend

In TPopupMenu

Alignment

AutoPopup

Handle

PopupComponent

Derived from TMenu

AutoHotkeys

Bitmap

Color

Images

Items

Derived from THandleComponent

HelpContext

HelpKeyword

HelpType

Hooks

ParentWidget

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TPopupMenu properties

TPopupMenu	By object	Legend

Alignment

AutoHotkeys

AutoPopup

Bitmap

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Handle

HelpContext

HelpKeyword

HelpType

Hooks

Images

Items

Name

Owner

ParentWidget

PopupComponent

Tag


TPopupMenu.Alignment
 CLX 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
 CLX 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.

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.Handle
 CLX Reference

TPopupMenu.::Handle

TPopupMenu	See also

Provides access to the unique 4-byte identifier that represents the instance of a QMenu object.

property Handle: QPopupMenuH;

Description

Use Handle to return a typed pointer to the instance of the underlying QMenu class. This Handle can be used when making low-level function calls into the QT shared libraries, where the function call requires an instance pointer to a QMenu object.


TPopupMenu.PopupComponent
 CLX 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.


 CLX Reference

TPopupMenu events

TPopupMenu	Alphabetically	Legend

In TPopupMenu

OnPopup

Derived from TMenu

OnChange


 CLX Reference

TPopupMenu events

TPopupMenu	By object	Legend

OnChange

OnPopup


TPopupMenu.OnPopup
 CLX 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.


 CLX Reference

TPopupMenu methods

TPopupMenu	Alphabetically	Legend

In TPopupMenu

Create

Popup

Derived from TMenu

Destroy

FindItem

IsShortCut

SetForm

Derived from THandleComponent

HandleAllocated

HandleNeeded

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

AfterConstrucion

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 CLX Reference

TPopupMenu methods

TPopupMenu	By object	Legend

AfterConstrucion

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FindItem

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleAllocated

HandleNeeded

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

IsShortCut

MethodAddress

MethodName

NewInstance

Popup

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetForm

SetSubComponent

UpdateAction


TPopupMenu.Create
 CLX 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.Popup
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

THandleComponent

TMenu

TPopupMenu


TProgressBar
 CLX Reference

 TProgressBar

Hierarchy	Properties	Methods	Events	Using TProgressBar

TProgressBar displays a simple progress bar.

Unit

QComCtrls

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 specified color.


 CLX Reference

TProgressBar Properties

TProgressBar	Alphabetically	Legend

In TProgressBar

BorderWidth

Caption

FillColor

Max

Min

Orientation

Position

ShowCaption

Smooth

Step

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Enabled

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TProgressBar Properties

TProgressBar	By Object	Legend

Action

Align

Anchors

BorderWidth

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

FillColor

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Max

Min

Name

Orientation

Owner

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

Position

ShowCaption

ShowHint

Smooth

Step

Tag

Top

Visible

Width


TProgressBar.BorderWidth
 CLX Reference

TProgressBar.BorderWidth

TProgressBar

Specifies the width of the control’s border.

property BorderWidth: TBorderWidth;

Description

Use BorderWidth to get or set the width of the progress bar's border. This is the area within the edge of the control that always shows the background color. The progress fill and the caption are clipped to the area within the border.


TProgressBar.Caption
 CLX Reference

TProgressBar.Caption

TProgressBar 	See also

Caption string displayed inside progress bar.

property Caption: TCaption;

Description

Use Caption to specify the text string that labels the progress bar. The caption is not displayed unless ShowCaption is set to True.

In a progress bar, the position and color of the caption is determined by the Smooth and Orientation properties. If Smooth is False, the caption and fill have separate display areas, with the caption on the right if Orientation is pbHorizontal, and on top if Orientation is pbVertical. If Smooth is True, the caption is centered with respect to the whole control, and the part of the caption that intersects the fill is displayed in clHightlightText instead of the font color.


TProgressBar.FillColor
 CLX Reference

TProgressBar.FillColor

TProgressBar

Specify color of progress indicator.

property FillColor: TColordefault clHighlight;

Description

The value of FillColor determines the color used to fill in the progress indicator.


TProgressBar.Handle
 CLX Reference

TProgressBar.Handle

TProgressBar

Return handle of underlying Qt object.

property Handle: QClxProgressBarH;

Description

Handle is a read-only property that returns a pointer to the underlying Qt control.


TProgressBar.Max
 CLX 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
 CLX 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
 CLX 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
 CLX 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.ShowCaption
 CLX Reference

TProgressBar.ShowCaption

TProgressBar	See Also

Specify caption visibility.

property ShowCaption: Boolean;

Description

If ShowCaption is False (default), the control caption does not appear.


TProgressBar.Smooth
 CLX 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
 CLX 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.


 CLX Reference

TProgressBar Events

TProgressBar	Alphabetically	Legend

In TProgressBar

OnChanging

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TProgressBar Events

TProgressBar	By Object	Legend

OnChanging

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


TProgressBar.OnChanging
 CLX Reference

TProgressBar.OnChanging

TProgressBar

Occurs immediately before a Position changes.

TProgressBarChangeEvent = procedure(Sender: TObject; var Text: WideString; NewPosition: Integer) ofobject;

property OnChanging: TProgressBarChangeEvent;

Description

The OnChanging event handler is called when the Position property is about to change. Text contains the progress bar's caption. NewPosition is the new value of the Position property.


 CLX Reference

TProgressBar Methods

TProgressBar	Alphabetically	Legend

In TProgressBar

Create

StepBy

StepIt

Derived from TGraphicControl

Destroy

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

Invalidate

ParentToClient

Refresh

Repaint

ScreenToClient

SendToBack

SetBounds

Show

Update

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TProgressBar Methods

TProgressBar	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DragDrop

Dragging

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

Show

StepBy

StepIt

Update

UpdateAction


TProgressBar.Create
 CLX 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.CreateWidget
 CLX Reference

TProgressBar.CreateWidget

TProgressBar

Creates the underlying Qt Widget.

procedure CreateWidget; override;

Description

CreateWidget is a protected method that is called automatically when the underlying Qt Widget needs to be created, when the control is first painted. CreateWidget is also called when a property change requires that the underlying Qt Widget be destroyed and recreated.

TProgressBar descendants override CreateWidget to modify they way the underlying Qt Widget is created.


TProgressBar.InitWidget
 CLX Reference

TProgressBar.InitWidget

TProgressBar	See also

Initializes the underlying widget before it is displayed after it has been created.

procedure InitWidget; override;

Description

InitWidget is called internally after the CreateWidget method is called. InitWidget initializes the underlying widget prior to the widget being displayed after it has been created.

Override InitWidget to specify how the widget is to be displayed after it has been created. When overriding InitWidget, call the inherited method so that the default processing can occur.


TProgressBar.StepBy
 CLX 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
 CLX 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

TGraphicControl

TProgressBar


TPublishableVariantType
 CLX Reference

TPublishableVariantType

Hierarchy	Properties	Methods	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 FMTBcd unit, which implements a custom variant type for binary-coded decimal numbers.


 CLX Reference

TPublishableVariantType properties

TPublishableVariantType	Alphabetically	Legend

Derived from TCustomVariantType

VarType


 CLX Reference

TPublishableVariantType properties

TPublishableVariantType	By object	Legend

VarType


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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


TQPrintAdapter
 CLX Reference

TQPrintAdapter

Hierarchy	Properties	Methods	See also

TQPrintAdapter implements the QT printer routines. By default, TPrinter creates a TQPrintAdapter which is inherited from TPrintAdapter. Descendant classes should inherit from TPrintAdapter and implement the abstract methods.

Unit

QPrinters

Description

TQPrintAdapter is the default PrintAdapter created when using a TPrinter object. It acts as a wrapper for the QT Printer object.


 CLX Reference

TQPrintAdapter properties

TQPrintAdapter	Alphabetically	Legend

In TQPrintAdapter

ColorMode

FullPage

PageOrder


 CLX Reference

TQPrintAdapter properties

TQPrintAdapter	By Object	Legend

ColorMode

FullPage

PageOrder


TQPrintAdapter.ColorMode
 CLX Reference

TQPrintAdapter.ColorMode

TQPrintAdapter	See also 	Example

Sets the color mode of the printer.

property ColorMode: QPrinterColorMode;

Description

Used to indicate whether QPrinter should print in color or not. The possible values are:

QPrinterColorMode = (Color, GrayScale);


TQPrintAdapter.FullPage
 CLX Reference

TQPrintAdapter.FullPage

TQPrintPageOrder	See also 	Example

Determines if the full page is to be used or not.

property FullPage: Boolean;

Description

Sets QPrinter to have the origin of the coordinate system at the top left corner of the paper if TRUE, or where it thinks the top left corner of the printable area is if FALSE (by default).

If the page-size mode is changed while the printer is active, the current print job may or may not be affected.


TQPrintAdapter.PageOrder
 CLX Reference

TQPrintAdapter.PageOrder

TQPrintAdapter	See also 	Example

Sets the page order for printing.

property PageOrder: Boolean;

Description

Used by QPrinter/QPrintDialog to tell the application program how to print. The possible values are

QPrinterPageOrder =(FirstPageFirst, LastPageFirst)


 CLX Reference

TQPrintAdapter methods

TQPrintAdapter	Alphabetically	Legend

In TQPrintAdapter

Abort

BeginDoc

Create

EndDoc

NewPage

ExecuteSetup

SetOutput

SupportOutputType

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


 CLX Reference

TQPrintAdapter methods

TQPrintAdapter	By Obect	Legend

Abort

AfterConstruction

BeforeDestruction

BeginDoc

ClassInfo

ClassNameIs

ClassName

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

EndDoc

ExecuteSetup

FieldAddress

FreeInstance

Free

GetInterfaceEntry

GetInterfaceTable

GetInterface

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

NewPage

SafeCallException

SetOutput

SupportOutputType


TQPrintAdapter.Abort
 CLX Reference

TQPrintAdapter.Abort

TQPrintAdapter	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.


TQPrintAdapter.BeginDoc
 CLX Reference

TQPrintAdapter.BeginDoc

TQPrintAdapter	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.


TQPrintAdapter.Create
 CLX Reference

TQPrintAdapter.Create

TQPrintAdapter	See also

Creates a QPrintAdapter.

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.


TQPrintAdapter.EndDoc
 CLX Reference

TQPrintAdapter.EndDoc

TQPrintAdapter	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 being 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.


TQPrintAdapter.NewPage
 CLX Reference

TQPrintAdapter.NewPage

TQPrintAdapter	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).


TQPrintAdapter.ExecuteSetup
 CLX Reference

TQPrintAdapter.ExecuteSetup

TQPrintAdapter	See also 	Example

Calls the QPrintAdapter’s setup dialog box.

function ExecuteSetup: Boolean;

Description

Launches the QPrintAdapter’s setup dialog box.


TQPrintAdapter.SetOutput
 CLX Reference

TQPrintAdapter.SetOutput

TQPrintAdapter	See also 	Example

Sets the output of the print job.

function (AOutputType: TOutputType; AOutputDevice: string): boolean;

Description

Set the output of the print job to the type specified by AOutputType. AOutputType can take any one of the following value: otPrinter, otProgram, otFileName, otPort, otCustom. AOutputDevice is the name of the device specified by the first paramter. For example, if you specify otPrinter as the output type, then the AOutputDevice could be the name of the printer.


TQPrintAdapter.SupportOutputType
 CLX Reference

TQPrintAdapter.SupportOutputType

TQPrintAdapter	See also 	Example

Returns a Boolean indicating if the output type is supported.

function SupportOutputType(Value: TOutputType): Boolean; override;

Description

Depending on the output type passed as the Value parameter, a Boolean is returned indicating whether the output type is supported by the current print adapter or not.


Hierarchy

TObject

TQPrintAdapter


TQPrintAdapter
 CLX Reference

TQPrintAdapter

Hierarchy	Properties	Methods	See also

TQPrintAdapter implements the QT printer routines. By default, TPrinter creates a TQPrintAdapter which is inherited from TPrintAdapter. Descendant classes should inherit from TPrintAdapter and implement the abstract methods.

Unit

QPrinters

Description

TQPrintAdapter is the default PrintAdapter created when using a TPrinter object. It acts as a wrapper for the QT Printer object.


 CLX Reference

TQPrintAdapter properties

TQPrintAdapter	Alphabetically	Legend

In TQPrintAdapter

ColorMode

FullPage

PageOrder


 CLX Reference

TQPrintAdapter properties

TQPrintAdapter	By Object	Legend

ColorMode

FullPage

PageOrder


TQPrintAdapter.ColorMode
 CLX Reference

TQPrintAdapter.ColorMode

TQPrintAdapter	See also 	Example

Sets the color mode of the printer.

property ColorMode: QPrinterColorMode;

Description

Used to indicate whether QPrinter should print in color or not. The possible values are:

QPrinterColorMode = (Color, GrayScale);


TQPrintAdapter.FullPage
 CLX Reference

TQPrintAdapter.FullPage

TQPrintPageOrder	See also 	Example

Determines if the full page is to be used or not.

property FullPage: Boolean;

Description

Sets QPrinter to have the origin of the coordinate system at the top left corner of the paper if TRUE, or where it thinks the top left corner of the printable area is if FALSE (by default).

If the page-size mode is changed while the printer is active, the current print job may or may not be affected.


TQPrintAdapter.PageOrder
 CLX Reference

TQPrintAdapter.PageOrder

TQPrintAdapter	See also 	Example

Sets the page order for printing.

property PageOrder: Boolean;

Description

Used by QPrinter/QPrintDialog to tell the application program how to print. The possible values are

QPrinterPageOrder =(FirstPageFirst, LastPageFirst)


 CLX Reference

TQPrintAdapter methods

TQPrintAdapter	Alphabetically	Legend

In TQPrintAdapter

Abort

BeginDoc

Create

EndDoc

NewPage

ExecuteSetup

SetOutput

SupportOutputType

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


 CLX Reference

TQPrintAdapter methods

TQPrintAdapter	By Obect	Legend

Abort

AfterConstruction

BeforeDestruction

BeginDoc

ClassInfo

ClassNameIs

ClassName

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

EndDoc

ExecuteSetup

FieldAddress

FreeInstance

Free

GetInterfaceEntry

GetInterfaceTable

GetInterface

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

NewPage

SafeCallException

SetOutput

SupportOutputType


TQPrintAdapter.Abort
 CLX Reference

TQPrintAdapter.Abort

TQPrintAdapter	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.


TQPrintAdapter.BeginDoc
 CLX Reference

TQPrintAdapter.BeginDoc

TQPrintAdapter	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.


TQPrintAdapter.Create
 CLX Reference

TQPrintAdapter.Create

TQPrintAdapter	See also

Creates a QPrintAdapter.

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.


TQPrintAdapter.EndDoc
 CLX Reference

TQPrintAdapter.EndDoc

TQPrintAdapter	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 being 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.


TQPrintAdapter.NewPage
 CLX Reference

TQPrintAdapter.NewPage

TQPrintAdapter	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).


TQPrintAdapter.ExecuteSetup
 CLX Reference

TQPrintAdapter.ExecuteSetup

TQPrintAdapter	See also 	Example

Calls the QPrintAdapter’s setup dialog box.

function ExecuteSetup: Boolean;

Description

Launches the QPrintAdapter’s setup dialog box.


TQPrintAdapter.SetOutput
 CLX Reference

TQPrintAdapter.SetOutput

TQPrintAdapter	See also 	Example

Sets the output of the print job.

function (AOutputType: TOutputType; AOutputDevice: string): boolean;

Description

Set the output of the print job to the type specified by AOutputType. AOutputType can take any one of the following value: otPrinter, otProgram, otFileName, otPort, otCustom. AOutputDevice is the name of the device specified by the first paramter. For example, if you specify otPrinter as the output type, then the AOutputDevice could be the name of the printer.


TQPrintAdapter.SupportOutputType
 CLX Reference

TQPrintAdapter.SupportOutputType

TQPrintAdapter	See also 	Example

Returns a Boolean indicating if the output type is supported.

function SupportOutputType(Value: TOutputType): Boolean; override;

Description

Depending on the output type passed as the Value parameter, a Boolean is returned indicating whether the output type is supported by the current print adapter or not.


Hierarchy

TObject

TQPrintAdapter


TQtDialog
 CLX Reference

TQtDialog

Hierarchy	Properties	Methods	Events	See also

TQtDialog is the ancestor of all Qt dialog boxes.

Unit

QDialogs

Description

TQtDialog serves as a base class for dialogs that encapsulate the Qt shared library dialog widgets. The TQtDialog descendents handle such tasks as opening and saving 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, all CLX dialogs are modal.


 CLX Reference

TQtDialog properties

TQtDialog	Alphabetically	Legend

In TQtDialog

Handle

NativeFlags

UseNativeDialog

Derived from TDialog

Height

HelpContext

HelpKeyword

HelpType

Modal

Position

Title

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TQtDialog properties

TQtDialog	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Handle

Height

HelpContext

HelpKeyword

HelpType

Modal

Name

NativeFlags

Owner

Position

Tag

Title

UseNativeDialog

Width


TQtDialog.Handle
 CLX Reference

TQtDialog.Handle

TQtDialog	See also

Specifies the window handle of the dialog box.

property Handle: QDialogH;

Description

The Handle property, which provides access to the dialog’s widget handle (also known as a window handle) after a call to Execute, can be used in OnShow and OnClose event handlers. Handle is reset to nil after the dialog closes.


TQtDialog.NativeFlags
 CLX Reference

TQtDialog.NativeFlags

TQtDialog	See also

Specifies the flag arguments passed to native dialog creation routines.

property NativeFlags: Integer;

Description

If UseNativeDialog is set to True, native dialog box types (such as those found in Microsoft Windows products) will be displayed instead of Qt dialogs. Use NativeFlags to define the flag arguments that will be passed to the native dialog creation routine. The default value is 0.


TQtDialog.UseNativeDialog
 CLX Reference

TQtDialog.UseNativeDialog

TQtDialog	See also

Indicates whether native dialog box types should be displayed instead of Qt dialogs.

property UseNativeDialog: Boolean;

Description

Some operating systems (like the various flavors of Microsoft Windows) have their own native dialog box types for common tasks, such as opening a file. Set UseNativeDialog to True if you know your application will be running in an environment that has these native dialogs, and if you would prefer to use them instead of the Qt dialogs. The flags which will be passed to the native dialog creation methods are stored in NativeFlags.


 CLX Reference

TQtDialog events

TQtDialog	Alphabetically	Legend

In TDialog

OnClose

OnShow


 CLX Reference

TQtDialog events

TQtDialog	By object	Legend

OnClose

OnShow


 CLX Reference

TQtDialog methods

TQtDialog	Alphabetically	Legend

In TQtDialog

Create

Destroy

Execute

HandleAllocated

Derived from TDialog

DoClose

DoExecute

DoShow

GetBounds

SetBounds

SetTitle

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


 CLX Reference

TQtDialog methods

TQtDialog	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoClose

DoExecute

DoShow

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleAllocated

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TQtDialog.Create
 CLX Reference

TQtDialog.Create

TQtDialog	See also

Creates and initializes a TQtDialog 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.


TQtDialog.Destroy
 CLX Reference

TQtDialog.Destroy

TQtDialog	See also

Destroys the TQtDialog 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.


TQtDialog.Execute
 CLX Reference

TQtDialog.Execute

TQtDialog	See also

Displays the dialog box.

function Execute: Boolean; override;

Description

Use Execute to display the dialog box. See the documentation for the inherited method for more information about the function of Execute.


TQtDialog.HandleAllocated
 CLX Reference

TQtDialog.HandleAllocated

TQtDialog	See also

Determines whether or not the dialog has a widget handle.

function HandleAllocated: Boolean; override;

Description

Use HandleAllocated to determine if a dialog object has had a widget handle assigned to it yet.


Hierarchy

TObject

TPersistent

TComponent

TDialog

TQtDialog


TQueue
 CLX 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.


 CLX 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


 CLX 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
 CLX Reference

 TRadioButton

Hierarchy	Properties	Methods	Events	Using TRadioButton	See also

TRadioButton is a wrapper for a system radio button.

Unit

QStdCtrls

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, TButtonGroup 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.


 CLX Reference

TRadioButton properties

TRadioButton	Alphabetically	Legend

In TRadioButton

Checked

Handle

Derived from TButtonControl

Caption

Derived from TWidgetControl

Bitmap

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Masked

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TRadioButton Properties

TRadioButton	By Object	Legend

Action

Align

Anchors

Bitmap

BoundsRect

Brush

Caption

Checked

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Masked

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width


TRadioButton.Checked
 CLX 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.


TRadioButton.Handle
 CLX Reference

TRadioButton.Handle

TRadioButton

Specifies a 4-byte identifier that uniquely identifies the underlying Qt QRadioButton widget instance.

property Handle: QRadioButtonH;

Description

Use Handle to return a typed pointer to the instance of the underlying QRadioButton object. This Handle can be used when making low-level function calls into the Qt shared libraries, where the function call requires an instance pointer to a QRadioButton object.


 CLX Reference

TRadioButton events

TRadioButton	Alphabetically	Legend

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TRadioButton Events

TRadioButton	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TRadioButton methods

TRadioButton	Alphabetically 	Legend

In TRadioButton

Click

Create

Derived from TButtonControl

AccelChar

AnimateClick

Toggle

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TRadioButton Methods

TRadioButton	By Object	Legend

AccelChar

AfterConstruction

AnimateClick

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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Toggle

Update

UpdateAction

UpdateControlState


TRadioButton.Click
 CLX Reference

TRadioButton.Click

TRadioButton

Generates an OnClick event.

procedure Click; override;

Description

Call Click to generate an OnClick event. Before calling the inherited Click method, Click sets the button to the depressed state and all other radio buttons in the group to the normal state. If the radio button has an OnClick event handler, Click allows an application to simulate a click on the button.


TRadioButton.Create
 CLX 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, and the ControlStyle set to csSetCaption and csDoubleClicks.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TButtonControl

TRadioButton


TRadioGroup
 CLX Reference

 TRadioGroup

Hierarchy	Properties	Methods	Events	Using TRadioGroup	See also

TRadioGroup represents a group of radio buttons that function together.

Unit

QExtCtrls

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 line or in multiple lines by setting the Columns property. Organize the buttons into rows or columns by setting the Orientation property.


 CLX Reference

TRadioGroup properties

TRadioGroup	Alphabetically	Legend

Derived from TCustomRadioGroup

Columns

Handle

ItemIndex

Items

Orientation

Derived from TCustomGroupBox

Alignment

Derived from TWidgetControl

Bitmap

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Masked

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TRadioGroup properties

TRadioGroup	By object	Legend

Action

Align

Alignment

Anchors

Bitmap

BoundsRect

Brush

Caption

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Columns

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

ItemIndex

Items

Left

Masked

Name

Orientation

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width


 CLX Reference

TRadioGroup events

TRadioGroup	Alphabetically	Legend

Derived from TWidgetControl

OnEnter

OnExit

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnStartDrag


 CLX Reference

TRadioGroup events

TRadioGroup	By object	Legend

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnStartDrag


 CLX Reference

TRadioGroup methods

TRadioGroup	Alphabetically	Legend

Derived from TCustomRadioGroup

Create

Destroy

SetFocus

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TRadioGroup methods

TRadioGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomGroupBox

TCustomRadioGroup

TRadioGroup


AnsiSameCaption function
 CLX Reference

AnsiSameCaption function

See also

Indicates whether two strings are the same based on the current locale, ignoring case information and accelerator characters.

Unit

QMenus

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 locale. The return value is True if the two strings have the same value, False otherwise.


GetHotkey function
 CLX Reference

GetHotkey function

See also

Returns the last character in a string marked with an ampersand (&).

Unit

QMenus

Category

menu support routines

function GetHotKey(const Text: WideString): WideString;

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
 CLX Reference

NewItem function

See also	Example

Creates and initializes a menu item.

Unit

QMenus

Category

menu support routines

function NewItem(const ACaption: WideString; 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
 CLX Reference

NewLine function

See also

Creates a menu item for a separator.

Unit

QMenus

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
 CLX Reference

NewMenu function

See also	Example

Creates and initializes a main menu.

Unit

QMenus

Category

menu support routines

function NewMenu(Owner: TComponent; const AName: string; Items: 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
 CLX Reference

NewPopupMenu function

See also

Creates and initializes a popup menu.

Unit

QMenus

Category

menu support routines

function NewPopupMenu(Owner: TComponent; const AName: string; Alignment: TPopupAlignment; AutoPopup: Boolean; Items: 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
 CLX Reference

NewSubMenu function

See also

Creates and initializes a menu item that represents a submenu.

Unit

QMenus

Category

menu support routines

function NewSubMenu(const ACaption: WideString; hCtx: THelpContext; const AName: string; 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.


ShortCut function
 CLX Reference

ShortCut function

See also 	Example

Creates a menu shortcut for a specified key combination.

Unit

QMenus

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 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.


ShortCutToKey procedure
 CLX Reference

ShortCutToKey procedure

See also 	Example

Returns the key code and shift state of a menu shortcut.

Unit

QMenus

Category

menu support routines

procedure ShortCutToKey(ShortCut: TShortCut; var Key: Word; var Shift: TShiftState;

Description

Call ShortCutToKey to parse a menu shortcut into its key code and shift state parts.

ShortCut is the value of the menu shortcut.

Key returns the key code for the key.

Shirt returns the associated combination of Shift, Ctrl, and Alt keys.


ShortCutToText function
 CLX Reference

ShortCutToText function

See also 	Example

Converts a menu shortcut into a string that describes the shortcut.

Unit

Category

menu support routines

function ShortCutToText(ShortCut: TShortCut): WideString;

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
 CLX Reference

StripHotKey function

See also

Removes the accelerator character marker from a string.

Unit

Category

menu support routines

function StripHotKey (const Text: WideString): WideString;

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
 CLX Reference

TextToShortCut function

See also 	Example

Creates a menu shortcut from a text string.

Unit

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.


ValidMenuHotkeys variable
 CLX Reference

ValidMenuHotkeys variable

See also

Determines what accelerator keys can be automatically assigned to a menu item caption.

Unit

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.


WideSameCaption function
 CLX Reference

WideSameCaption function

See also

Indicates whether two strings are the same based on the current Windows locale, ignoring case information and accelerator characters.

Unit

QMenus

Category

menu support routines

function WideSameCaption(const Text1, Text2: WideString): Boolean;

Description

WideSameCaption 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 locale. The return value isTrue if the two strings have the same value, F


TStatusPanel
 CLX Reference

TStatusPanel

Hierarchy	Properties	Methods	See also

TStatusPanel represents a single panel of a status bar.

Unit

QComCtrls

Description

Each TStatusBar uses a TStatusPanels to maintain a collection of TStatusPanel objects.


 CLX Reference

TStatusPanel Properties

TStatusPanel	Alphabetically	Legend

In TStatusPanel

Alignment

Bevel

DisplayName

PanelPosition

StatusPanels

Text

Visible

Width

Derived from TCollectionItem

Collection

ID

Index


 CLX Reference

TStatusPanel Properties

TStatusPanel	By Object	Legend

Alignment

Bevel

Collection

DisplayName

ID

Index

PanelPosition

StatusPanels

Text

Visible

Width


TStatusPanel.Alignment
 CLX 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
 CLX 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.DisplayName
 CLX 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.PanelPosition
 CLX Reference

TStatusPanel.PanelPosition

TStatusPanel	See also

Determine placement of panel.

TPanelPosition = (ppLeft, ppRight);

property PanelPosition: TPanelPosition default ppLeft;

Description

PanelPosition determine whether the panel is placed on the left or the right of the status bar. All panels set to ppLeft are ordered by Index from the left edge of the status bar. All panels set to ppRight are ordered by Index from the right edge of the status bar.


TStatusPanel.StatusPanels
 CLX Reference

TStatusPanel.StatusPanels

TStatusPanel

Specifies the TStatusPanels instance to which the TStatusPanel belongs.

property StatusPanels: TStatusPanels;

Description

Each TStatusPanel belongs to the TStatusPanels which creates it. The StatusPanels property points to the StatusPanels object to which the item belongs.

StatusPanels is a protected property, useable only in descendent classes. In application code, refer to Collection instead.


TStatusPanel.Text
 CLX 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.Visible
 CLX Reference

TStatusPanel.Visible

TStatusPanel

Specifies whether the panel is visible.

property Visible: Boolean;

Description

To hide a panel, set Visible to False.


TStatusPanel.Width
 CLX 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.


 CLX Reference

TStatusPanel Methods

TStatusPanel	Alphabetically	Legend

In TStatusPanel

Assign

Create

Destroy

GetDisplayName

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


 CLX 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

SafeCallException


TStatusPanel.Assign
 CLX 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
 CLX 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.Destroy
 CLX Reference

TStatusPanel.Destroy

TStatusPanel	See also

Destroys the TStatusPanel instance and frees its memory.

destructor Destroy; override;

Description

In TStatusPanel, Destroy does additional bookkeeping relating to panels positioned on the right.


TStatusPanel.GetDisplayName
 CLX 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.


Hierarchy

TObject

TPersistent

TCollectionItem

TStatusPanel


TStatusPanels
 CLX Reference

TStatusPanels

Hierarchy	Properties	Methods	See also

TStatusPanels is a container for TStatusPanel objects.

Unit

QComCtrls

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.


 CLX Reference

TStatusPanels properties

TStatusPanels	Alphabetically	Legend

In TStatusPanels

Items

Derived from TCollection

Count

ItemClass


 CLX Reference

TStatusPanels properties

TStatusPanels	By object	Legend

Count

ItemClass

Items


TStatusPanels.Items
 CLX 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.


 CLX Reference

TStatusPanels methods

TStatusPanels	Alphabetically	Legend

In TStatusPanels

Add

Create

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


 CLX Reference

TStatusPanels methods

TStatusPanels	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

GetOwner

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException

Update


TStatusPanels.Add
 CLX 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.Create
 CLX 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
 CLX 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
 CLX 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.Update
 CLX 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


TStyle
 CLX Reference

TStyle

Hierarchy	Properties	Methods	Events	See also

Specifies a set of defaults for drawing the widgets in a CLX application.

Unit

QStyle

Description

TStyle is the base class for objects that represent the style used to paint objects in a CLX application. A style gives an application its “look and feel”.

When a widget in the application paints itself, it generates several events on the TStyle object that customize parts of the paint operation. You can customize the style by assigning event handlers to these events, or use a predefined style by setting the DefaultStyle property.

Use TStyle descendants such as TApplicationStyle and TWidgetStyle to customize the way a CLX application paints its widgets.


 CLX Reference

TStyle properties

TStyle	Alphabetically	Legend

In TStyle

ButtonShift

CheckSize

DefaultFrameWidth

DefaultStyle

Handle

Hooks

MaxSliderDragDistance

RadioSize

SliderLength


 CLX Reference

TStyle properties

TStyle	By object	Legend

ButtonShift

CheckSize

DefaultFrameWidth

DefaultStyle

Handle

Hooks

MaxSliderDragDistance

RadioSize

SliderLength


TStyle.ButtonShift
 CLX Reference

TStyle.ButtonShift

TStyle

Specifies the distance the image of a button moves when it is depressed.

property ButtonShift: TPoint;

Description

Set ButtonShift to configure the way a button moves when it is depressed. When the button is clicked, the position of its image is offset by the number of pixels in ButtonShift. Positive values indicate movement to the right or down. Negative values indicate movement to the left or up.


TStyle.CheckSize
 CLX Reference

TStyle.CheckSize

TStyle	See also

Specifies the size of the mark used to indicate a selected item or button.

property CheckSize: TSize;

Description

Set CheckSize to control the size of checkmarks that appear on items that represent a user selection. CheckSize indicates the boundaries, in pixels, of the area that the checkmark, or equivalent indicator, covers.


TStyle.DefaultFrameWidth
 CLX Reference

TStyle.DefaultFrameWidth

TStyle	See also

Specifies the default width, in pixels, for drawing frames.

property DefaultFrameWidth: Integer;

Description

Set DefaultFrameWidth to specify the number of pixels taken, by default, to draw the frame around widgets such as panels and group boxes.


TStyle.DefaultStyle
 CLX Reference

TStyle.DefaultStyle

TStyle

Specifies a predefined style configuration that is used by default.

type TDefaultStyle = (dsWindows, dsMotif, dsMotifPlus, dsCDE, dsQtSGI, dsPlatinum, dsSystemDefault);

property DefaultStyle: TDefaultStyle;

Description

Set DefaultStyle to use one of the predefined styles as a starting point for the style. Each DefaultStyle value represents a basic “look and feel” for the widgets in the application. You can further customize any of these styles by using the TStyle properties or supplying event handlers to the TStyle events.

Warning:	The value of DefaultStyle must be supported by the desktop on which the application is running.


TStyle.Handle
 CLX Reference

TStyle.Handle

TStyle	See also

Indicates the handle to the Qt Style instance that this TStyle object represents.

property Handle: QClxStyleH;

Description

Read Style to obtain the handle to the Qt Style instance when you want to work with the style by making low-level API calls into the Qt shared libraries.


TStyle.Hooks
 CLX Reference

TStyle.Hooks

TStyle	See also

Indicates the handle to the Qt object that enables this TStyle object to respond to events.

property Hooks: QClxStyleHooksH;

Description

Applications should not need to use the Hooks property. Hooks is a handle to the Qt object that receives notifications of system events that affect the underlying Qt Style instance. It is used to implement the TStyle events.


TStyle.MaxSliderDragDistance
 CLX Reference

TStyle.MaxSliderDragDistance

TStyle	See also

Indicates how far the mouse may be dragged off a scrollbar or track bar before the position reverts to the original.

property MaxSliderDragDistance: Integer;

Description

Set MaxSliderDragDistance to indicate how far the mouse can be dragged off a scrollbar or track bar before the position reverts. If MaxSliderDragDistance is –1, there is no jump back to a previous position.


TStyle.RadioSize
 CLX Reference

TStyle.RadioSize

TStyle	See also

Specifies the size of the mark used to indicate a selected radio item.

property RadioSize: TSize;

Description

Set RadioSize to control the size of radio buttons that represent a user selection from a set of mutually exclusive choices. RadioSize indicates the boundaries, in pixels, of the area that the radio button, or equivalent indicator, covers.


TStyle.SliderLength
 CLX Reference

TStyle.SliderLength

TStyle	See also

Specifies the length of the slider in pixels.

property SliderLength: Integer;

Description

Use SliderLength to specify the length, in pixels, of the slider control on a track bar.


 CLX Reference

TStyle events

TStyle	Alphabetically	Legend

In TStyle

AfterDrawButton

AfterDrawItem

AfterDrawMenuItem

BeforeDrawButton

BeforeDrawItem

BeforeDrawMenuItem

ButtonRect

ComboButtonFocusRect

ComboButtonRect

DrawArrow

DrawButtonFrame

DrawButtonLabel

DrawButtonMask

DrawCheck

DrawCheckMask

DrawComboButton

DrawComboButtonMask

DrawFocusRect

DrawFrame

DrawHeaderSection

DrawHint

DrawMenuCheck

DrawMenuFrame

DrawRadio

DrawRadioMask

DrawScrollBar

DrawSplitter

DrawTab

DrawTabMask

DrawTrackBar

DrawTrackBarGroove

DrawTrackBarGrooveMask

DrawTrackBarMask

ExtraMenuItemWidth

GetItemRect

HeaderSectionRect

MenuItemHeight

OnChange

ScrollBarMetrics

SubmenuIndicatorWidth

TabMetrics


 CLX Reference

TStyle events

TStyle	By object	Legend

AfterDrawButton

AfterDrawItem

AfterDrawMenuItem

BeforeDrawButton

BeforeDrawItem

BeforeDrawMenuItem

ButtonRect

ComboButtonFocusRect

ComboButtonRect

DrawArrow

DrawButtonFrame

DrawButtonLabel

DrawButtonMask

DrawCheck

DrawCheckMask

DrawComboButton

DrawComboButtonMask

DrawFocusRect

DrawFrame

DrawHeaderSection

DrawHint

DrawMenuCheck

DrawMenuFrame

DrawRadio

DrawRadioMask

DrawScrollBar

DrawSplitter

DrawTab

DrawTabMask

DrawTrackBar

DrawTrackBarGroove

DrawTrackBarGrooveMask

DrawTrackBarMask

ExtraMenuItemWidth

GetItemRect

HeaderSectionRect

MenuItemHeight

OnChange

ScrollBarMetrics

SubmenuIndicatorWidth

TabMetrics


TStyle.AfterDrawButton
 CLX Reference

TStyle.AfterDrawButton

TStyle	See also

Occurs immediately after a push button is drawn.

type TAfterDrawButtonEvent = procedure(Sender, Source: TObject; Canvas: TCanvas) of object;

property AfterDrawButton: TAfterDrawButtonEvent;

Description

Write an AfterDrawButton event handler to provide finishing touches after push buttons are drawn.

Sender is the TStyle object that receives this event.

Source is the button that was just painted.

Canvas is the canvas on which the button was just drawn.


TStyle.AfterDrawItem
 CLX Reference

TStyle.AfterDrawItem

TStyle	See also

Occurs immediately after a text or bitmap item has been drawn.

type TAfterDrawItemEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; Flags: Integer; Enabled: Boolean; Bitmap: TBitmap; const Text: WideString; Length: Integer; Color: TColor) of object;

property AfterDrawItem: TAfterDrawItemEvent;

Description

Write an AfterDrawItem event handler to provide finishing touches to a items after the default rendering. Items may be the label on a button, an item in a list box, and so on.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which the item was just painted.

Rect specifies the boundaries of the item on Canvas.

Flags is a set of flags that indicates the state of the item. It is a sum of values from the following table:

Value	Meaning

1	The item is Selected.

2	The item is Grayed.

4	The item has focus.

Enabled specifies whether the item is enabled.

Bitmap specifies a bitmap that is used to render the item.

Text specifies the text of the item.

Length specifies the maximum length, in pixels, that can be used to render the item. If Length is –1, there is no limit.

Color specifies the color of the pen used to render the item.


TStyle.AfterDrawMenuItem
 CLX Reference

TStyle.AfterDrawMenuItem

TStyle	See also

Occurs immediately after a menu item has been drawn.

type TAfterDrawMenuItemEvent = procedure(Sender, Source: TObject; Canvas: TCanvas; Highlighted, Enabled: Boolean; const Rect: TRect; Checkable: Boolean; CheckMaxWidth, LabelWidth: Integer) ofobject;

property AfterDrawMenuItem: TAfterDrawMenuItemEvent;

Description

Write an AfterDrawMenuItemEvent event handler to provide finishing touches to all menu items after they are drawn.

Sender is the TStyle object that receives this event.

Source is the TMenuItem object that was just rendered.

Canvas is the canvas on which the menu item was just drawn.

Highlighted indicates whether the item is highlighted.

Enabled indicates whether the item is enabled.

Rect specifies the boundaries of the item on Canvas.

Checkable specifies whether the item can be checked.

CheckMaxWidth is the maximum width, in pixels, of the check mark when Checkable is True.

LabelWidth is the maximum width, in pixels, of the portion of the menu item that contains the text.


TStyle.BeforeDrawButton
 CLX Reference

TStyle.BeforeDrawButton

TStyle	See also

Occurs immediately before a push button is drawn.

property BeforeDrawButton: TBeforeDrawButtonEvent;

Description

Write a BeforeDrawButton event handler to provide any initialization before push buttons are drawn, or to completely override the drawing of push buttons. If the BeforeDrawButton event handler fully renders the button, it should set DefaultDraw to False to prevent the default rendering.


TStyle.BeforeDrawItem
 CLX Reference

TStyle.BeforeDrawItem

TStyle	See also

Occurs immediately before a text or bitmap item is drawn.

type TBeforeDrawItemEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; Flags: Integer; Enabled: Boolean; Bitmap: TBitmap; const Text: WideString; Length: Integer; Color: TColor; var DefaultDraw: Boolean) ofobject;

property BeforeDrawItem: TBeforeDrawItemEvent;

Description

Write a BeforeDrawItem event handler to provide any initialization before items are drawn, or to completely override the drawing of items. Items include the labels on controls, the items that appear in list boxes and combo boxes, and so on.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which the item was just painted.

Rect specifies the boundaries of the item on Canvas.

Flags is a set of flags that indicates the state of the item. It is a sum of values from the following table:

Value	Meaning

1	The item is Selected.

2	The item is Grayed.

4	The item has focus.

Enabled specifies whether the item is enabled.

Bitmap specifies a bitmap to use when rendering the item.

Text specifies the text of the item.

Length specifies the maximum length, in pixels, that can be used to render the item. If Length is –1, there is no limit.

Color specifies the color of the pen used to render the item.

DefaultDraw returns a boolean that indicates whether the default rendering of the list item should proceed after the event handler exits. If the BeforeDrawItem event handler fully renders the item, it should set DefaultDraw to False to prevent the default rendering.


TStyle.BeforeDrawMenuItem
 CLX Reference

TStyle.BeforeDrawMenuItem

TStyle	See also

Occurs immediately before a menu item is drawn.

type TBeforeDrawMenuItemEvent = procedure(Sender, Source: TObject; Canvas: TCanvas; Highlighted, Enabled: Boolean; const Rect: TRect; Checkable: Boolean; CheckMaxWidth, LabelWidth: Integer; var DefaultDraw: Boolean) ofobject;

property BeforeDrawMenuItem: TBeforeDrawMenuItem;

Description

Write a BeforeDrawMenuItem event handler to provide any initialization before menu items are drawn, or to completely override the drawing of menu items.

Sender is the TStyle object that receives this event.

Source is the TMenuItem object that is about to be rendered.

Canvas is the canvas on which the menu item will be drawn.

Highlighted indicates whether the item is highlighted.

Enabled indicates whether the item is enabled.

Rect specifies the boundaries of the item on Canvas.

Checkable specifies whether the item can be checked.

CheckMaxWidth is the maximum width, in pixels, of the check mark when Checkable is True.

LabelWidth is the maximum width, in pixels, of the portion of the menu item that contains the text.

DefaultDraw returns a boolean that indicates whether the default rendering of the menu item should proceed after the event handler exits. If the BeforeDrawItem event handler fully renders the item, it should set DefaultDraw to False to prevent the default rendering.


TStyle.ButtonRect
 CLX Reference

TStyle.ButtonRect

TStyle	See also

Occurs when the application needs to determine the dimensions of a push button object.

property ButtonRect: TButtonRectEvent;

Description

Write a ButtonRect event handler to indicate what portion of a push button is used to draw its contents. Typically, a ButtonRect event handler returns the entire rectangle minus the border, but it may return a smaller value for specialized button styles such as rounded buttons.

On entry to the event handler, Rect indicates the dimensions of the entire widget. The event handler adjusts this value.


TStyle.ComboButtonFocusRect
 CLX Reference

TStyle.ComboButtonFocusRect

TStyle	See also

Occurs when the application needs to determine the dimensions of the focus rectangle in a combo box.

property ComboButtonFocusRect: TButtonRectEvent;

Description

Write a ComboButtonFocusRect event handler to indicate what portion of a combo box is used to draw the focus rectangle. On entry to the event handler, the Rect parameter indicates the dimensions of the entire combo box. The event handler adjusts this value to indicate where the focus rectangle should be drawn.


TStyle.ComboButtonRect
 CLX Reference

TStyle.ComboButtonRect

TStyle	See also

Occurs when the application needs to determine the dimensions of the drop-down button on a combo box.

property ComboButtonRect: TButtonRectEvent;

Description

Write a ComboButtonRect event handler to indicate what portion of a combo box is used to draw the drop-down button.

On entry to the event handler, the Rect parameter indicates the dimensions of the entire combo box. The event handler adjusts this value to return the dimensions of the drop-down button.


TStyle.DrawArrow
 CLX Reference

TStyle.DrawArrow

TStyle	See also

Occurs when the application needs to draw a direction indicator, such as in a scroll bar or spin box.

type

  ArrowType = (ArrowType_UpArrow, ArrowType_DownArrow, ArrowType_LeftArrow, ArrowType_Right_Arrow);

  TDrawArrowEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; Arrow: ArrowType; Down, Enabled: Boolean) ofobject;

property DrawArrow: TDrawArrowEvent;

Description

Write a DrawArrow event handler to customize the appearance of the arrows that appear on controls such as scroll bars and spin boxes. The DrawArrow event handler renders the image of the arrow by drawing on the supplied canvas.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which to draw the arrow.

Rect specifies the boundaries of the arrow on Canvas.

Arrow indicates the direction in which the arrow points.

Down indicates whether the button on which the arrow appears is depressed.

Enabled indicates whether the button on which the arrow appears is enabled.


TStyle.DrawButtonFrame
 CLX Reference

TStyle.DrawButtonFrame

TStyle	See also

Occurs when the application needs to draw a push button.

type TDrawButtonFrameEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; Down: Boolean; var DefaultDraw: Boolean) ofobject;

property DrawButtonFrame: TDrawButtonFrameEvent;

Description

Write a DrawButtonFrame event handler to customize the appearance of push buttons. The DrawButtonFrame event handler renders the image of the button by drawing on the supplied canvas, possibly allowing the default rendering to finish the process.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which to draw the button.

Rect specifies the boundaries of the button on Canvas.

Down indicates whether the button is currently depressed.

DefaultDraw indicates whether the default rendering of the button should continue after the event handler exits. If the DrawButtonFrame event handler fully renders the button, it should set DefaultDraw to False to prevent the default rendering.


TStyle.DrawButtonLabel
 CLX Reference

TStyle.DrawButtonLabel

TStyle	See also

Occurs when the application needs to draw the label on a push button.

property DrawButtonLabel: TBeforeDrawButtonEvent;

Description

Write a DrawButtonLabel event handler to customize the way push buttons draw their labels. The event handler can simply initialize the properties of the canvas and then allow the default rendering to occur, or it can draw the label and then set the DefaultDraw parameter to False so as to prevent the default rendering.


TStyle.DrawButtonMask
 CLX Reference

TStyle.DrawButtonMask

TStyle	See also

Occurs when the application can draw a mask to change the shape of a push button.

property DrawButtonMask: TDrawMaskEvent;

Description

Write a DrawButtonMask event handler to provide a mask for drawing push buttons. The mask causes parts of the push button to be transparent, resulting in a non-rectangular push button (for example, a rounded button).


TStyle.DrawCheck
 CLX Reference

TStyle.DrawCheck

TStyle	See also

Occurs when the application needs to draw a check mark or other selection indicator.

type TDrawCheckEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; Checked, Grayed, Down, Enabled: Boolean; var DefaultDraw: Boolean) ofobject;

property DrawCheck: TDrawCheckEvent;

Description

Write a DrawCheck event handler to customize the appearance of the check marks that appear in check boxes.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which to draw the check mark.

Rect specifies the dimensions on Canvas where the check mark should be drawn.

Checked indicates whether the check mark indicates a checked item or an unchecked item.

Grayed indicates whether the check mark is on a grayed item.

Down indicates whether the check mark is on a depressed item.

Enabled indicates whether the check mark is on an enabled item.

DefaultDraw indicates whether the application should continue with the default process of rendering the check mark after the DrawCheck event handler exits.


TStyle.DrawCheckMask
 CLX Reference

TStyle.DrawCheckMask

TStyle	See also

Occurs when the application can draw a mask that renders part of a check mark’s image transparent.

type TDrawCheckMaskEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; Checked, Grayed: Boolean) ofobject;

property DrawCheckMask: TDrawCheckMaskEvent;

Description

Write a DrawCheckMask to provide a mask for drawing check marks (or similar selection indicators) on check boxes. The mask causes parts of the rectangle that contains the check mark to be transparent, masking out those portions that are not part of the check mark.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which to draw the check mark mask.

Rect specifies the dimensions on Canvas where the check mark appears.

Checked indicates whether the check mark indicates a checked item or an unchecked item.

Grayed indicates whether the check mark is on a grayed item.


TStyle.DrawComboButton
 CLX Reference

TStyle.DrawComboButton

TStyle	See also

Occurs when the application needs to draw the drop-down button on a combo box or menu item.

type TDrawComboButtonEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; Sunken, ReadOnly, Enabled: Boolean; var DefaultDraw: Boolean) ofobject;

property DrawComboButton: TDrawComboButtonEvent;

Description

Write a DrawComboButton event handler to customize the appearance of the drop-down buttons that appear on combo boxes and menu items.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which to draw the drop-down button.

Rect specifies the dimensions on Canvas where the drop-down button should be drawn.

Sunken indicates whether the button should appear depressed.

ReadOnly indicates whether the combo box or menu item is read-only.

Enabled indicates whether the combo box or menu item is enabled.

DefaultDraw indicates whether the application should continue with the default process of rendering the drop-down button after the DrawComboButton event handler exits.


TStyle.DrawComboButtonMask
 CLX Reference

TStyle.DrawComboButtonMask

TStyle	See also

Occurs when the application can draw a mask to change the shape of a drop-down button.

property DrawComboButtonMask: TDrawMaskEvent;

Description

Write a DrawComboButtonMask event handler to provide a mask for drawing the drop-down button that appears on combo boxes and menu items. The mask causes parts of the drop-down button to be transparent, resulting in a non-rectangular button.


TStyle.DrawFocusRect
 CLX Reference

TStyle.DrawFocusRect

TStyle	See also

Occurs when the application needs to indicate that keyboard focus is on the item that occupies a specified rectangle.

type TDrawFocusRectEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; AtBorder: Boolean; var DefaultDraw: Boolean) ofobject;

property DrawFocusRect: TDrawFocusRectEvent;

Description

Write a DrawFocusRect event handler to paint the rectangle that indicates keyboard focus.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which to paint the focus rectangle.

Rect specifies the dimensions on Canvas of the item that has keyboard focus.

AtBorder indicates whether the item that occupies the position indicated by Rect is at the border of an item (for example, an item in a listbox). Certain styles (for example Motif) need to shrink the rectangle a bit when drawing the focus rectangle so that it is visible.

DefaultDraw indicates whether the default rendering of a focus rectangle should proceed after the event handler exits.


TStyle.DrawFrame
 CLX Reference

TStyle.DrawFrame

TStyle	See also

Occurs when the application needs to draw the frame that sets off a rectangular region.

type TDrawFrameEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; Sunken: Boolean; LineWidth: Integer;  var DefaultDraw: Boolean) ofobject;

property DrawFrame: TDrawFrameEvent;

Description

Write a DrawFrame event handler to paint the frames on framed controls that have a BorderStyle property set to bsRaisedPanel or bsSunkenPanel.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which to paint the frame.

Rect specifies the dimensions on Canvas where the frame should appear.

Sunken indicates whether the frame should have a sunken appearance.

LineWidth indicates the width, in pixels, of the frame.

DefaultDraw indicates whether the default rendering of a frame should proceed after the event handler exits.


TStyle.DrawHeaderSection
 CLX Reference

TStyle.DrawHeaderSection

TStyle	See also

Occurs when the application needs to draw a section of a header control.

type

TDrawHeaderSectionEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; Down: Boolean; var DefaultDraw: Boolean) ofobject;

property DrawHeaderSection: TDrawHeaderSectionEvent;

Description

Write a DrawHeaderSection event handler to paint the pressable section headers that appear in a header control.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which to paint the header section.

Rect specifies the dimensions on Canvas where the header section should appear.

Down indicates whether the header section is depressed.

DefaultDraw indicates whether the default rendering of a header section should proceed after the event handler exits.


TStyle.DrawHint
 CLX Reference

TStyle.DrawHint

TStyle	See also

Occurs when the application needs to draw a help hint.

type

TDrawHintEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; var DefaultDraw: Boolean) ofobject;

property DrawHint: TDrawHintEvent;

Description

Write a DrawHint event handler to customize the appearance of the hint that appears when the user pauses the mouse over a control.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which to paint the hint.

Rect specifies the dimensions on Canvas where the hint should appear.

DefaultDraw indicates whether the default rendering of a hint should proceed after the event handler exits.

Note:	The preferred way to customize hints is to create a THintWindow descendant and assign it as the value of the HintWindowClass variable.


TStyle.DrawMenuCheck
 CLX Reference

TStyle.DrawMenuCheck

TStyle	See also

Occurs when the application needs to draw the check mark on a checkable menu item.

type TDrawMenuCheckEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; Checked, Enabled: Boolean) ofobject;

property DrawMenuCheck: TDrawMenuCheckEvent;

Description

Write a DrawMenuCheck event handler to customize the appearance of the check marks that appear on menu items.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which to draw the check mark.

Rect specifies the dimensions on Canvas where the check mark should be drawn.

Checked indicates whether the check mark indicates a checked item or an unchecked item.

Enabled indicates whether the check mark is on an enabled menu item.


TStyle.DrawMenuFrame
 CLX Reference

TStyle.DrawMenuFrame

TStyle	See also

Occurs when an application needs to draw a frame around a popup menu.

type TDrawMenuFrameEvent = procedure(Sender: TObject; Canvas: TCanvas; R: TRect; LineWidth: Integer; var DefaultDraw: Boolean) ofobject;

property DrawMenuFrame: TDrawMenuFrameEvent;

Description

Write a DrawFrame event handler to paint the frames that appear around popup menus.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which to paint the frame.

R specifies the dimensions of the popup menu.

LineWidth indicates the width, in pixels, of the frame.

DefaultDraw indicates whether the default rendering of a frame should proceed after the event handler exits.


TStyle.DrawRadio
 CLX Reference

TStyle.DrawRadio

TStyle	See also

Occurs when the application needs to paint a radio button.

type TDrawRadioEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; Checked, Down, Enabled: Boolean; var DefaultDraw: Boolean) ofobject;

property DrawRadio: TDrawRadioEvent;

Description

Write a DrawRadio event handler to customize the appearance of radio buttons.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which to paint the radio button.

Rect specifies the dimensions of the radio button.

Checked indicates whether the radio button is currently selected.

Down indicates whether the radio button is currently depressed.

Enabled indicates whether the radio button is currently enabled.

DefaultDraw indicates whether the default rendering of a radio button should proceed after the event handler exits.


TStyle.DrawRadioMask
 CLX Reference

TStyle.DrawRadioMask

TStyle	See also

Occurs when the application can provide a mask that renders part of a radio button image transparent.

type TDrawRadioMaskEvent = procedure(Sender: TObject; Canvas: : TCanvas; const Rect: TRect; Checked: Boolean) ofobject;

property DrawRadioMask: TDrawRadioMaskEvent;

Description

Write a DrawRadioMask event handler to supply a mask that masks off part of a radio button so that it has a non-rectangular shape. The mask causes portions of the radio button’s rectangle to be transparent.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which to apply the radio button’s mask.

Rect specifies the dimensions of the radio button.

Checked indicates whether the radio button is currently selected.


TStyle.DrawScrollBar
 CLX Reference

TStyle.DrawScrollBar

TStyle	See also

Occurs when the application needs to draw a scroll bar.

type

  TDrawScrollBarEvent = procedure(Sender: TObject; ScrollBar: QScrollBarH; Canvas: TCanvas; const Rect: TRect; SliderStart, SliderLength, ButtonSize: Integer; Controls: TScrollBarControls; DownControl: TScrollBarControlvar DefaultDraw: Boolean) ofobject;

property DrawScrollBar: TDrawScrollBarEvent;

Description

Write a DrawScrollBar event handler to customize the appearance of scroll bars.

Sender is the TStyle object that receives this event.

ScrollBar is the handle the Qt scrollbar widget whose image is being drawn.

Canvas is the canvas on which to paint the scroll bar.

Rect indicates the dimensions of the scrollbar on Canvas.

SliderStart specifies the position of the thumb tab.

SliderLength specifies the length of the thumb tab.

ButtonSize specifies the size of the arrow buttons that appear on the edge of the scroll bar.

Controls indicates which parts of the scroll bar need to be painted.

DownControl indicates which part of the scroll bar is depressed by the mouse.

DefaultDraw indicates whether the default rendering of the scroll bar should proceed after the event handler exits.


TStyle.DrawSplitter
 CLX Reference

TStyle.DrawSplitter

TStyle	See also

Occurs when the application needs to draw a splitter.

type TDrawSplitterEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; Vertical: Boolean; var DefaultDraw: Boolean) of object;

property DrawSplitter: TDrawSplitterEvent;

Description

Write a DrawSplitter event handler to customize the appearance of splitters.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which to paint the splitter.

Rect indicates the dimensions of the splitter on Canvas.

Vertical indicates the orientation of the splitter.

DefaultDraw indicates whether the default rendering of the splitter should proceed after the event handler exits.


TStyle.DrawTab
 CLX Reference

TStyle.DrawTab

TStyle	See also

Occurs when an application needs to draw a tab in a tabbed control.

property DrawTab: TDrawTabEvent;

Description

Write a DrawTab event handler to customize the appearance of tabbed controls. The DrawTab event handler draws a single tab from the tabbed control onto the supplied canvas.


TStyle.DrawTabMask
 CLX Reference

TStyle.DrawTabMask

TStyle	See also

Occurs when an application can apply a mask to the tab in a tabbed control to give it a non-rectangular shape.

property DrawTabMask: TDrawTabEvent;

Description

Write a DrawTabMask event handler to provide a mask for the tab drawn by a DrawTab event handler. The DrawTabMask event handler applies a mask to the supplied canvas so that the portions of the tab rectangle appear transparent. This allows the tabbed control to have tabs that are not rectangular.


TStyle.DrawTrackBar
 CLX Reference

TStyle.DrawTrackBar

TStyle	See also

Occurs when the application needs to draw a track bar.

property DrawTrackBar: TDrawTrackBarEvent;

Description

Write a DrawTrackBar event handler to customize the appearance of track bars. The DrawTrackBar event handler paints the image of the track bar onto the supplied canvas.


TStyle.DrawTrackBarGroove
 CLX Reference

TStyle.DrawTrackBarGroove

TStyle	See also

Occurs when an application needs to draw the groove in a track bar.

property DrawTrackBarGroove: TDrawTrackBarGrooveEvent;

Description

Write a DrawTrackBarGroove event handler to customize the appearance of the groove down which a track bar slider moves. The DrawTrackBarGroove event handler paints the image of the groove onto the supplied canvas.


TStyle.DrawTrackBarGrooveMask
 CLX Reference

TStyle.DrawTrackBarGrooveMask

TStyle	See also

Occurs when the application can apply a mask to the image of a track bar groove.

property DrawTrackBarGrooveMask: TDrawTrackBarGrooveEvent;

Description

Write a DrawTrackBarGrooveMask event handler to apply a mask to the customized drawing of a track bar groove that is supplied by a DrawTrackBarGroove event handler. The mask allows the groove to take a non-rectangular shape by masking portions of the groove’s image so that they are transparent.


TStyle.DrawTrackBarMask
 CLX Reference

TStyle.DrawTrackBarMask

TStyle	See also

Occurs when the application can apply a mask to the image of a track bar.

property DrawTrackBarMask: TDrawTrackBarEvent;

Description

Write a DrawTrackBarMask event handler to apply a mask to the customized drawing of a track bar that is supplied by a DrawTrackBar event handler. The mask allows the track bar to take a non-rectangular shape by masking portions of the track bar’s image so that they are transparent.


TStyle.ExtraMenuItemWidth
 CLX Reference

TStyle.ExtraMenuItemWidth

TStyle	See also

Occurs when an application needs to calculate the width required for menu items in a popup menu.

type TExtraMenuItemWidthEvent = procedure(Sender, Source: TObject; HasCheckmark: Boolean; ImageWidth: Integer; FontMetrics: QFontMetricsH; var ExtraWidth: Integer) ofobject;

property ExtraMenuItemWidth: TExtraMenuItemWidthEvent;

Description

Write an ExtraMenuItemWidth event handler to calculate and return the extra width that is needed to render menu items. This is the width for drawing all parts of the menu item other than the text.

Sender is the TStyle object that receives this event.

Source is the object that represents the menu.

HasCheckmark indicates whether the menu items must leave space for check marks or other images.

ImageWidth is the maximum width of all bitmaps used to display the images that HasCheckmark indicates are present.

FontMetrics is a handle to the Qt object that defines the font metrics used to draw the menu’s text.

ExtraWidth returns the width that should be added to all menu items beyond that required to draw the menu item text.


TStyle.GetItemRect
 CLX Reference

TStyle.GetItemRect

TStyle	See also

Occurs when the application needs to calculate where to place text or a bitmap.

type TGetItemRectEvent = procedure(Sender: TObject; Canvas: TCanvas; var Rect: TRect; Flags: Integer; Enabled: Boolean; Bitmap: TBitmap; const Text: string) ofobject;

property GetItemRect: TGetItemRectEvent;

Description

Write a GetItemRect event handler to customize the placement of text or bitmaps. The item to place can be the label on a controls, an item that appears in a list box or combo box, or similar item.

Sender is the TStyle object that receives this event.

Canvas is the canvas on which the item will be drawn.

Rect represents the boundaries of where the text or bitmap is drawn. On entry to the event handler, this is the total space allotted for drawing the item (the surface of a button, the label area on a control, the area allotted to an item in a list box, and so on.) The event handler adjusts this value to indicate precisely where the text or bitmap should be drawn.

Flags indicate features of the item to be drawn. These are the same as the flags passed to the BeforeDrawItem and AfterDrawItem event handlers.

Enabled indicates whether the item is enabled.

Bitmap is the bitmap that is to be drawn (if it is a bitmap).

Text is the text that is to be written (if it is text).


TStyle.HeaderSectionRect
 CLX Reference

TStyle.HeaderSectionRect

TStyle	See also

Occurs when an application needs to calculate the size to use for the interior of a header section.

property HeaderSectionRect: TButtonRectEvent;

Description

Write a HeaderSectionRect event handler to indicate what portion of a header section is used to draw its contents. Typically, a HeaderSectionRect event handler returns the entire rectangle minus the border, but it may return a smaller value for specialized button styles such as rounded buttons.

On entry to the event handler, Rect indicates the dimensions of the entire header section. The event handler adjusts this value.


TStyle.MenuItemHeight
 CLX Reference

TStyle.MenuItemHeight

TStyle	See also

Occurs when an application needs to determine the height of a menu item.

type TMenuItemHeightEvent = procedure(Sender, Source: TObject; Checkable: Boolean; FontMetrics: QFontMetricsH; var Height: Integer) ofobject;

property MenuItemHeight: TMenuItemHeightEvent;

Description

Write a MenuItemHeight event handler to calculate and return the height needed for menu items when the TStyle object customizes their appearance.

Sender is the TStyle object that receives this event.

Source is the TMenuItem that needs to be drawn.

Checkable indicates whether the menu item can include a checkmark or other selection indicator.

FontMetrics is a handle to the Qt object that represents the metrics of the font that will be used to draw the menu item’s text.

Height returns the total height needed to render the menu item.


TStyle.OnChange
 CLX Reference

TStyle.OnChange

TStyle

Occurs when a property or event handler of the TStyle object changes.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to respond when the style changes. Every time an application sets a property or supplies an event handler to the TStyle object, it updates the underlying Qt style object, and then generates an OnChange event.


TStyle.ScrollBarMetrics
 CLX Reference

TStyle.ScrollBarMetrics

TStyle	See also

Occurs when the application needs to calculate the size of the buttons and thumb tab on a scrollbar.

type TScrollBarMetricsEvent = procedure(Sender: TObject; ScrollBar: QScrollBarH; var SliderLength, ButtonSize: Integer) ofobject;

property ScrollBarMetrics: TScrollBarMetricsEvent;

Description

Write a ScrollBarMetrics event handler to supply the size needed for drawing the thumb tab and/or arrow buttons on a scrollbar.

Sender is the TStyle object that receives this event.

ScrollBar is the handle to the scroll bar widget that needs to be drawn.

SliderLength is the length that should be allotted to the thumb tab. The event handler adjusts this value as necessary.

ButtonSize is the length of the arrow buttons that appear on either end of the thumb track. The event handler adjusts this value as necessary.


TStyle.SubmenuIndicatorWidth
 CLX Reference

TStyle.SubmenuIndicatorWidth

TStyle	See also

Occurs when the application needs to calculate the size of the indicator that appears on a menu item that has a submenu.

type TSubmenuIndicatorWidthEvent = procedure(Sender: TObject; FontMetrics: QFontMetricsH; var Width: Integer) ofobject;

property SubmenuIndicatorWidth: TSubmenuIndicatorWidthEvent;

Description

Write a SubmenuIndicatorWidth event handler to calculate and return the space needed for the indicator that appears when a menu item has a submenu.

Sender is the TStyle object that receives this event.

FontMetrics is a handle to the Qt object that represents the metrics of the font that will be used to draw the menu item’s text.

Width returns the width needed to render the submenu indicator.


TStyle.TabMetrics
 CLX Reference

TStyle.TabMetrics

TStyle	See also

Occurs when the application needs to determine the amount of spaced that must be allotted for various areas of the tab on a tabbed control.

type TTabMetricsEvent = procedure(Sender, Source: TObject; var HorizonalPadding, VerticalPadding, Overlap: Integer) ofobject;

property TabMetrics: TTabMetricsEvent;

Description

Write a TabBarMetrics event handler to calculate and return the space used for various parts of a tab on a tabbed control.

Sender is the TStyle object that receives this event.

Source is the tabbed control that is about to be drawn.

HorizontalPadding returns the number of pixels that must appear between the edges of each tab and its text label.

VerticalPadding returns the number of pixels that must appear between the top of each tab and its text label.

Overlap returns the number of pixels by which individual tabs overlap.


 CLX Reference

TStyle methods

TStyle	Alphabetically	Legend

In TStyle

Changed

Create

CreateHandle

DoAfterDrawButton

DoAfterDrawItem

DoBeforeDrawButton

DoBeforeDrawItem

DoButtonRect

DoComboButtonFocusRect

DoComboButtonRect

DoDrawArrow

DoDrawButtonFrame

DoDrawButtonLabel

DoDrawButtonMask

DoDrawCheck

DoDrawCheckMask

DoDrawComboButton

DoDrawComboButtonMask

DoDrawFocusRect

DoDrawFrame

DoDrawHeaderSection

DoDrawMenuCheck

DoDrawMenuFrame

DoDrawMenuItem

DoDrawRadio

DoDrawRadioMask

DoDrawScrollBar

DoDrawSplitter

DoDrawTab

DoDrawTabMask

DoDrawTrackBar

DoDrawTrackBarGroove

DoDrawTrackBarGrooveMask

DoDrawTrackBarMask

DoExtraMenuItemWidth

DoGetItemRect

DoHeaderSectionRect

DoMenuItemHeight

DoScrollBarMetrics

DoSubmenuIndicatorWidth

DoTabMetrics

GetHooks

HandleNeeded

Refresh

StyleDestroyed

StyleDestroyedHook

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


 CLX Reference

TStyle methods

TStyle	By object	Legend

AfterConstruction

BeforeDestruction

Changed

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateHandle

DefaultHandler

Destroy

Dispatch

DoAfterDrawButton

DoAfterDrawItem

DoBeforeDrawButton

DoBeforeDrawItem

DoButtonRect

DoComboButtonFocusRect

DoComboButtonRect

DoDrawArrow

DoDrawButtonFrame

DoDrawButtonLabel

DoDrawButtonMask

DoDrawCheck

DoDrawCheckMask

DoDrawComboButton

DoDrawComboButtonMask

DoDrawFocusRect

DoDrawFrame

DoDrawHeaderSection

DoDrawMenuCheck

DoDrawMenuFrame

DoDrawMenuItem

DoDrawRadio

DoDrawRadioMask

DoDrawScrollBar

DoDrawSplitter

DoDrawTab

DoDrawTabMask

DoDrawTrackBar

DoDrawTrackBarGroove

DoDrawTrackBarGrooveMask

DoDrawTrackBarMask

DoExtraMenuItemWidth

DoGetItemRect

DoHeaderSectionRect

DoMenuItemHeight

DoScrollBarMetrics

DoSubmenuIndicatorWidth

DoTabMetrics

FieldAddress

Free

FreeInstance

GetHooks

GetInterface

GetInterfaceEntry

GetInterfaceTable

HandleNeeded

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Refresh

SafeCallException

StyleDestroyed

StyleDestroyedHook


TStyle.Changed
 CLX Reference

TStyle.Changed

TStyle	See also

Generates an OnChange event.

procedure Changed; virtual;

Description

Changed is called automatically when a TStyle property is set or an event handler is assigned. It updates the underlying Qt Style object so that it reflects any changes, and then generates an OnChange event.

Descendant classes should call Changed from the property setter for any new properties or events.


TStyle.Create
 CLX Reference

TStyle.Create

TStyle	See also

Creates and initializes a new TStyle object.

constructor Create; virtual;

Description

Typically, applications do not need to create new TStyle objects. Instead, they set the properties and events of the TStyle instance that implements the Style property of the global Application object or of a Widget control.


TStyle.CreateHandle
 CLX Reference

TStyle.CreateHandle

TStyle	See also

Obtains a handle to the underlying Qt Style object.

procedure CreateHandle; virtual;

Description

The HandleNeeded method calls CreateHandle when the TStyle object needs a handle to the underlying Qt Style object and does not already have one.

If this TStyle object represents the same style as the one specified by the Application object’s Style property, CreateHandle simply assigns that object’s handle as the value of the Handle property. Otherwise, CreateHandle creates and initializes the Qt Style object and sets its handle as the value of Handle.


TStyle.DoAfterDrawButton
 CLX Reference

TStyle.DoAfterDrawButton

TStyle	See also

Generates an AfterDrawButton event.

procedure DoAfterDrawButton(Source: TObject; Canvas: TCanvas); virtual;

Description

DoAfterDrawButton is called automatically after the application draws a push button. . It generates an AfterDrawButton event so that the event handler can provide any final touches to the button image.

Source is the object that represents the push button.

Canvas is the canvas on which the button image was drawn.


TStyle.DoAfterDrawItem
 CLX Reference

TStyle.DoAfterDrawItem

TStyle	See also

Generates an AfterDrawItem event.

procedure DoAfterDrawItem(Canvas: TCanvas; const Rect: TRect; Flags: Integer; Enabled: Boolean; Bitmap: TBitmap; const Text: WideString; Length: Integer; Color: TColor); virtual;

Description

DoAfterDrawItem is called automatically after a text or bitmap item is drawn. . It generates an AfterDrawItem event so that the event handler can provide any final touches to the item image.

Canvas is the canvas on which the item was just painted.

Rect specifies the boundaries of the item on Canvas.

Flags is a set of flags that indicates the state of the item.

Enabled specifies whether the item is enabled.

Bitmap specifies a bitmap that is used to render the item.

Text specifies the text of the item.

Length specifies the maximum length, in pixels, that can be used to render the item.

Color specifies the color of the pen used to render the item.


TStyle.DoBeforeDrawButton
 CLX Reference

TStyle.DoBeforeDrawButton

TStyle	See also

Generates a BeforeDrawButton event.

function DoBeforeDrawButton(Source: TObject; Canvas: TCanvas): Boolean; virtual;

Description

DoBeforeDrawButton is called automatically when a push button needs to be painted. It generates a BeforeDrawButton event, which can draw the button or perform any initializations.

Source is the object that represents the push button.

Canvas is the canvas on which the button image needs to be drawn.

DoBeforeDrawButton returns True if the default rendering of the button should occur after the DoBeforeDrawButton call, False if DoBeforeDrawButton handled the task of drawing the button.


TStyle.DoBeforeDrawItem
 CLX Reference

TStyle.DoBeforeDrawItem

TStyle	See also

Generates a BeforeDrawItem event.

function DoBeforeDrawItem(Canvas: TCanvas; const Rect: TRect; Flags: Integer; Enabled: Boolean; Bitmap: TBitmap; const Text: string; Length: Integer; Color: TColor): Boolean; virtual;

Description

DoBeforeDrawItem is called automatically before an application draws a text or bitmap item.

Canvas is the canvas on which the item should be painted.

Rect specifies the boundaries of the item on Canvas.

Flags is a set of flags that indicates the state of the item.

Enabled specifies whether the item is enabled.

Bitmap specifies a bitmap that is used to render the item.

Text specifies the text of the item.

Length specifies the maximum length, in pixels, that can be used to render the item.

Color specifies the color of the pen used to render the item.

DoBeforeDrawItem returns True if the default rendering of the item should occur after the DoBeforeDrawItem call, False if DoBeforeDrawItem handled the task of drawing the item.


TStyle.DoButtonRect
 CLX Reference

TStyle.DoButtonRect

TStyle	See also

Generates a ButtonRect event.

procedure DoButtonRect(var Rect: TRect); virtual;

Description

DoButtonRect is called automatically when the application needs to adjust the dimensions of a push button to obtain the area on which the button contents can be drawn. It generates a ButtonRect event to adjust the value of Rect.

Rect specifies the boundaries of the part of the button on which the contents can be drawn. When DoButtonRect is called, it is set to the dimensions of the button. DoButtonRect adjusts this value.


TStyle.DoComboButtonFocusRect
 CLX Reference

TStyle.DoComboButtonFocusRect

TStyle	See also

Generates a ComboButtonFocusRect event.

procedure DoComboButtonFocusRect(var Rect: TRect); virtual;

Description

DoComboButtonFocusRect is called automatically when an application needs to determine where to draw the focus rectangle on a combo box. It generates a ComboButtonFocusRect event to perform this task.

Rect specifies the boundaries of the focus rectangle. When DoComboButtonFocusRect is called, it is set to the dimensions of the combo box. DoComboButtonFocusRect adjusts this value.


TStyle.DoComboButtonRect
 CLX Reference

TStyle.DoComboButtonRect

TStyle	See also

Generates a ComboButtonRect event.

procedure DoComboButtonFocusRect(var Rect: TRect); virtual;

Description

DoComboButtonRect is called automatically when an application needs to determine where to draw the drop-down button on a combo box. It generates a ComboButtonRect event to perform this task.

Rect specifies the boundaries of the drop-down button. When DoComboButtonRect is called, it is set to the dimensions of the combo box. DoComboButtonRect adjusts this value.


TStyle.DoDrawArrow
 CLX Reference

TStyle.DoDrawArrow

TStyle	See also

Generates a DrawArrow event.

type ArrowType = (ArrowType_UpArrow, ArrowType_DownArrow, ArrowType_LeftArrow, ArrowType_Right_Arrow);

procedure DoDrawArrow(Canvas: TCanvas; const Rect: TRect; Arrow: ArrowType; Down, Enabled: Boolean); virtual;

Description

DoDrawArrow is called automatically when the application needs to draw an arrow on a scroll bar or spin control. It generates a DrawArrow event so that the event handler can render the image of the arrow.

Canvas is the canvas on which to draw the arrow.

Rect indicates the dimensions on Canvas where the arrow should appear.

Arrow indicates the direction in which the arrow points.

Down specifies whether the arrow button is depressed.

Enabled indicates whether the arrow button is enabled.

DoDrawArrow returns the value of the DrawArrow event handler’s DefaultDraw parameter.


TStyle.DoDrawButtonFrame
 CLX Reference

TStyle.DoDrawButtonFrame

TStyle	See also

Generates a DrawButtonFrame event.

function DoDrawButtonFrame(Canvas: TCanvas; const Rect: TRect; Down: Boolean): Boolean; virtual;

Description

DoDrawButtonFrame is called automatically when the application needs to draw a push button. It generates a DrawButtonFrame event so that the event handler can render the image of the button.

Canvas is the canvas on which to draw the button.

Rect indicates the dimensions on Canvas where the button should appear.

Down indicates whether the button should appear depressed.

DoDrawButtonFrame returns the value of the DrawButtonFrame event handler’s DefaultDraw parameter.


TStyle.DoDrawButtonLabel
 CLX Reference

TStyle.DoDrawButtonLabel

TStyle	See also

Generates a DrawButtonLabel event.

function DoDrawButtonLabel(Source: TObject; Canvas: TCanvas): Boolean; virtual;

Description

DoDrawButtonFrame is called automatically when the application needs to draw the label on a push button. It generates a DrawButtonFrame event so that the event handler can render the image of the button’s label.

Source is the button whose label is to be drawn.

Canvas is the canvas on which to draw the button.

DoDrawButtonFrame returns the value of the DrawButtonLabel event handler’s DefaultDraw parameter.


TStyle.DoDrawButtonMask
 CLX Reference

TStyle.DoDrawButtonMask

TStyle	See also

Generates a DrawButtonMask event.

procedure DoDrawButtonMask(Canvas: TCanvas; const Rect: TRect); virtual;

Description

DoDrawButtonMask is called automatically when the application needs to apply a mask to the image of a push button. It generates a DrawButtonMask event so that the event handler can apply the mask.

Canvas is the canvas on which the button is drawn.

Rect indicates the dimensions of the button on Canvas.

DoDrawButtonFrame returns the value of the DrawButtonMask event handler’s DefaultDraw parameter.


TStyle.DoDrawCheck
 CLX Reference

TStyle.DoDrawCheck

TStyle	See also

Generates a DrawCheck event.

function DoDrawCheck(Canvas: TCanvas; const Rect: TRect; Checked, Grayed, Down, Enabled: Boolean): Boolean; virtual;

Description

DoDrawCheck is called automatically when the application needs to draw a check mark. It generates a DrawCheck event so that the event handler can draw the check.

Canvas is the canvas on which to draw the check mark.

Rect specifies the dimensions on Canvas where the check mark should be drawn.

Checked indicates whether the check mark indicates a checked item or an unchecked item.

Grayed indicates whether the check mark is on a grayed item.

Down indicates whether the check mark is on a depressed item.

Enabled indicates whether the check mark is on an enabled item.

DoDrawCheck returns the value of the DrawCheck event handler’s DefaultDraw parameter.


TStyle.DoDrawCheckMask
 CLX Reference

TStyle.DoDrawCheckMask

TStyle	See also

Generates a DrawCheckMask event.

procedure DoDrawCheckMask(Canvas: TCanvas; const Rect: TRect; Checked, Grayed: Boolean); virtual;

Description

DoDrawCheckMask is called automatically when the application needs to apply a mask to the image of a check mark. It generates a DrawCheckMask event so that the event handler can apply the mask.

Canvas is the canvas on which the check mark is drawn.

Rect specifies the dimensions of the check mark.

Checked indicates whether the check mark indicates a checked item or an unchecked item.

Grayed indicates whether the check mark is on a grayed item.


TStyle.DoDrawComboButton
 CLX Reference

TStyle.DoDrawComboButton

TStyle	See also

Generates a DrawComboButton event.

function DoDrawComboButton(Canvas: TCanvas; const Rect: TRect; Sunken, ReadOnly, Enabled: Boolean): Boolean; virtual;

Description

DoDrawComboButton is called automatically when the application draws the drop-down button on a combo box or menu item. It generates a DrawComboButton event so that the event handler can render the image of the button.

Canvas is the canvas on which to draw the button.

Rect indicates the dimensions on Canvas where the button should appear.

Sunken indicates whether the button should appear depressed.

ReadOnly indicates whether the combo box or menu item is read-only.

Enabled indicates whether the combo box or menu item is enabled.

DoDrawComboButton returns the value of the DrawComboButton event handler’s DefaultDraw parameter.


TStyle.DoDrawComboButtonMask
 CLX Reference

TStyle.DoDrawComboButtonMask

TStyle	See also

Generates a DrawComboButtonMask event.

procedure DoDrawComboButtonMask(Canvas: TCanvas; const Rect: TRect); virtual;

Description

DoDrawComboButtonMask is called automatically when the application is ready to apply a mask to the drop-down button on a combo box or menu item. It generates a DrawComboButtonMask event so that the event handler can apply the mask.

Canvas is the canvas on which the button appears.

Rect indicates the dimensions of the button’s image on Canvas.


TStyle.DoDrawFocusRect
 CLX Reference

TStyle.DoDrawFocusRect

TStyle	See also

Generates a DrawFocusRect event.

function DoDrawFocusRect(Canvas: TCanvas; const Rect: TRect; AtBorder: Boolean): Boolean; virtual;

Description

DoDrawFocusRect is called automatically when the application needs paint the rectangle that indicates keyboard focus. It generates a DrawFocusRect event so that the event handler can draw the focus rectangle.

Canvas is the canvas on which to paint the focus rectangle.

Rect specifies the dimensions on Canvas of the item that has keyboard focus.

AtBorder indicates whether the item that occupies the position indicated by Rect is at the border of an item (for example, an item in a listbox). Certain styles (for example Motif) need to shrink the rectangle a bit when drawing the focus rectangle so that it is visible.

DoDrawFocusRect returns the value of the DrawFocusRect event handler’s DefaultDraw parameter.


TStyle.DoDrawFrame
 CLX Reference

TStyle.DoDrawFrame

TStyle	See also

Generates a DrawFrame event.

function DoDrawFrame(Canvas: TCanvas; const Rect: TRect; Sunken: Boolean; LineWidth: Integer): Boolean; virtual;

Description

DoDrawFrame is called automatically when the application needs paint the frame on a framed control with a BorderStyle property set to bsRaisedPanel or bsSunkenPanel. It generates a DrawFrame event so that the event handler can draw the frame.

Canvas is the canvas on which to paint the frame.

Rect specifies the dimensions on Canvas where the frame should appear.

Sunken indicates whether the frame should have a sunken appearance.

LineWidth indicates the width, in pixels, of the frame.

DoDrawFrame returns the value of the DrawFrame event handler’s DefaultDraw parameter.


TStyle.DoDrawHeaderSection
 CLX Reference

TStyle.DoDrawHeaderSection

TStyle	See also

Generates a DrawHeaderSection event.

function DoDrawHeaderSection(Canvas: TCanvas; const Rect: TRect; Down: Boolean): Boolean; virtual;

Description

DoDrawHeaderSection is called automatically when the application needs paint a section in a header control. It generates a DrawHeaderSection event so that the event handler can draw the section.

Canvas is the canvas on which to paint the header section.

Rect specifies the dimensions on Canvas where the header section should appear.

Down indicates whether the header section is depressed.

DoDrawHeaderSection returns the value of the event handler’s DefaultDraw parameter.


TStyle.DoDrawMenuCheck
 CLX Reference

TStyle.DoDrawMenuCheck

TStyle	See also

Generates a DrawMenuCheck event.

procedure DoDrawMenuCheck(Canvas: TCanvas; const Rect: TRect; Highlighted, Enabled: Boolean); virtual;

Description

DoDrawMenuCheck is called automatically when the application needs to draw the check mark on a checkable menu item. It generates a DrawMenuCheck event so that the event handler can draw the check.

Canvas is the canvas on which to paint the check mark.

Rect specifies the dimensions on Canvas where the check mark should appear.

Highlighted indicates whether the menu item is highlighted.

Enabled indicates whether the menu item is enabled.


TStyle.DoDrawMenuFrame
 CLX Reference

TStyle.DoDrawMenuFrame

TStyle	See also

Generates a DrawMenuFrame event.

function DoDrawMenuFrame(Canvas: TCanvas; const R: TRect; LineWidth: Integer): Boolean; virtual;

Description

DoDrawMenuFrame is called automatically when the application needs to draw the frame around a popup menu. It generates a DrawMenuFrame event so that an event handler can draw this frame.

Canvas is the canvas on which to draw the frame.

R indicates the dimensions of the popup menu.

LineWidth specifies the width of the frame.

DoDrawMenuFrame returns the DefaultDraw parameter of the DrawMenuFrame event handler.


TStyle.DoDrawMenuItem
 CLX Reference

TStyle.DoDrawMenuItem

TStyle	See also

Generates a BeforeDrawMenuItem or AfterDrawMenuItem event.

procedure DoDrawMenuItem(Source: TObject; Canvas: TCanvas; Highlighted, Enabled: Boolean; const Rect: TRect; Checkable: Boolean; CheckMaxWidth, LabelWidth: Integer; var Stage: Integer); virtual;

Description

DoDrawMenuItem is called automatically at various stages during the rendering of a menu item. It generates a BeforeDrawMenuItem or AfterDrawMenuItem event, depending on the current stage.

Source is the component that represents the menu.

Canvas is the canvas on which the menu item is drawn.

Highlighted indicates whether the menu item is highlighted.

Enabled indicates whether the menu item is enabled.

Rect specifies the boundaries of the item on Canvas.

Checkable specifies whether the item can be checked.

CheckMaxWidth is the maximum width, in pixels, of the check mark when Checkable is True.

LabelWidth is the maximum width, in pixels, of the portion of the menu item that contains the text.

Stage indicates the current stage in drawing the menu item. When Stage is DrawStage_Pre, DoDrawMenuItem generates a BeforeDrawMenuItem event, and then changes Stage to DrawStage_DefaultDraw if the event handler exits with the DefaultDraw parameter set to True (the default). When Stage is DrawStage_Post, DoDrawMenuItem generates an AfterDrawMenuItem event.


TStyle.DoDrawRadio
 CLX Reference

TStyle.DoDrawRadio

TStyle	See also

Generates a DrawRadio event.

function DoDrawRadio(Canvas: TCanvas; const Rect: TRect; Checked, Down, Enabled: Boolean): Boolean; virtual;

Description

DoDrawRadio is called automatically when the application needs to draw a radio button. It generates a DrawRadio event so that the event handler can draw the button.

Canvas is the canvas on which to draw the radio button.

Rect indicates the dimensions in which the radio button appears.

Checked indicates whether the button is in the selected, or checked, state.

Down indicates whether the mouse is currently depressing the radio button.

Enabled indicates whether the radio button is enabled.

DoDrawRadio returns the DefaultDraw parameter of the DrawRadio event handler.


TStyle.DoDrawRadioMask
 CLX Reference

TStyle.DoDrawRadioMask

TStyle	See also

Generates a DrawRadioMask event.

procedure DoDrawRadioMask(Canvas: : TCanvas; const Rect: TRect; Checked: Boolean); virtual;

Description

DoDrawRadioMask is called automatically when the application is ready to apply a mask to the image of a radio button. It generates a DrawRadioMask event so that the event handler can apply the mask.

Canvas is the canvas on which to apply the mask.

Rect indicates the dimensions in which the radio button appears.

Checked indicates whether the button is in the selected, or checked, state.


TStyle.DoDrawScrollBar
 CLX Reference

TStyle.DoDrawScrollBar

TStyle	See also

Generates a DrawScrollBar event.

function DoDrawScrollBar(ScrollBar: QScrollBarH; Canvas: TCanvas; const Rect: TRect; SliderStart, SliderLength, ButtonSize: Integer; Controls: TScrollBarControls; DownControl: TScrollBarControl): Boolean; virtual;

Description

Use DoDrawScrollBar is called automatically when the application needs to draw a scroll bar. It generates a DrawScrollBar event so that the event handler can paint the scrollbar.

ScrollBar is the handle the Qt scrollbar widget whose image is being drawn.

Canvas is the canvas on which to paint the scroll bar.

Rect indicates the dimensions of the scrollbar on Canvas.

SliderStart specifies the position of the thumb tab.

SliderLength specifies the length of the thumb tab.

ButtonSize specifies the size of the arrow buttons that appear on the edge of the scroll bar.

Controls indicates which parts of the scroll bar need to be painted.

DownControl indicates which part of the scroll bar is depressed by the mouse.

DoDrawScrollBar returns the value of the DrawScrollBar event handler’s DefaultDraw parameter.


TStyle.DoDrawSplitter
 CLX Reference

TStyle.DoDrawSplitter

TStyle	See also

Generates a DrawSplitter event.

function DoDrawSplitter(Canvas: TCanvas; const Rect: TRect; Vertical: Boolean): Boolean; virtual;

Description

DoDrawSplitter is called automatically when the application needs to draw a splitter control. It generates a DrawSplitter event so that the event handler can paint the splitter.

Canvas is the canvas on which to paint the splitter.

Rect indicates the dimensions of the splitter on Canvas.

Vertical indicates whether the splitter has a vertical orientation.

DoDrawSplitter returns the value of the DrawSplitter event handler’s DefaultDraw parameter.


TStyle.DoDrawTab
 CLX Reference

TStyle.DoDrawTab

TStyle	See also

Generates a DrawTab event.

procedure DoDrawTab(Source: TObject; Canvas: TCanvas; Index, HorizontalPadding, VerticalPadding, Overlap: Integer; Selected: Boolean); virtual;

Description

DoDrawTab is called automatically when the application needs to draw a tab in a tabbed control. It generates a DrawTab event so that the event handler can paint the tab.

Source is the tabbed control that contains the tab.

Canvas is the canvas on which to paint the tab.

Index is the index of the tab to paint.

HorizontalPadding indicates the number of pixels that must appear between the edge of the tab and its label.

VerticalPadding indicates the number of pixels that must appear between the top of the tab and its label.

Overlap indicates the number of pixels by which tabs overlap.

Selected indicates whether the tab is selected.


TStyle.DoDrawTabMask
 CLX Reference

TStyle.DoDrawTabMask

TStyle	See also

Generates a DrawTabMask event.

procedure DoDrawTabMask(Source: TObject; Canvas: TCanvas; Index, HorizontalPadding, VerticalPadding, Overlap: Integer; Selected: Boolean); virtual;

Description

DoDrawTabMask is called automatically when the application is ready to apply a mask to the image of a tab in a tabbed control. It generates a DrawTabMask event so that the event handler can apply the mask.

Source is the tabbed control that contains the tab.

Canvas is the canvas on which to paint the tab.

Index is the index of the tab to paint.

HorizontalPadding indicates the number of pixels that must appear between the edge of the tab and its label.

VerticalPadding indicates the number of pixels that must appear between the top of the tab and its label.

Overlap indicates the number of pixels by which tabs overlap.

Selected indicates whether the tab is selected.


TStyle.DoDrawTrackBar
 CLX Reference

TStyle.DoDrawTrackBar

TStyle	See also

Generates a DrawTrackBar event.

function DoDrawTrackBar(Canvas: TCanvas; const Rect: TRect; Horizontal, TickAbove, TickBelow: Boolean): Boolean; virtual;

Description

DoDrawTrackBar is called automatically when the application needs to paint a track bar. It generates a DrawTrackBar event so that the event handler can perform the painting.

Canvas is the canvas on which to paint the track bar.

Rect indicates the dimensions of the track bar object.

Horizontal indicates whether the track bar has a horizontal orientation.

TickAbove indicates whether the track bar should include tick marks above the slider groove.

TickBelow indicates whether the track bar should include tick marks below the slider groove.

DoDrawTrackBar returns the value of the DrawTrackBar event handler’s DefaultDraw parameter.


TStyle.DoDrawTrackBarGroove
 CLX Reference

TStyle.DoDrawTrackBarGroove

TStyle	See also

Generates a DrawTrackBarGroove event.

function DoDrawTrackBarGroove(Canvas: TCanvas; const Rect: TRect; Horizontal): Boolean; virtual;

Description

DoDrawTrackBarGroove is called automatically when the application needs to paint the slider groove in a track bar. It generates a DrawTrackBarGroove event so that the event handler can paint the groove.

Canvas is the canvas on which to paint the track bar groove.

Rect indicates the dimensions of the groove.

Horizontal indicates whether the track bar has a horizontal orientation.

DoDrawTrackBarGroove returns the value of the DrawTrackBarGroove event handler’s DefaultDraw parameter.


TStyle.DoDrawTrackBarGrooveMask
 CLX Reference

TStyle.DoDrawTrackBarGrooveMask

TStyle	See also

Generates a DrawTrackBarGrooveMask event.

function DoDrawTrackBarGrooveMask(Canvas: TCanvas; const Rect: TRect; Horizontal): Boolean; virtual;

Description

DoDrawTrackBarGrooveMask is called automatically when the application is ready to apply a mask to the image of the slider groove in a track bar. It generates a DrawTrackBarGrooveMask event so that the event handler can apply the mask.

Canvas is the canvas on which to apply the mask.

Rect indicates the dimensions of the groove.

Horizontal indicates whether the track bar has a horizontal orientation.

DoDrawTrackBarGrooveMask returns the value of the DrawTrackBarGrooveMask event handler’s DefaultDraw parameter.


TStyle.DoDrawTrackBarMask
 CLX Reference

TStyle.DoDrawTrackBarMask

TStyle	See also

Generates a DrawTrackBarMask event.

function DoDrawTrackBarMask(Canvas: TCanvas; Rect: TRect; Horizontal, TickAbove, TickBelow: Boolean): Boolean; virtual;

Description

DoDrawTrackBar is called automatically when the application is ready to apply a mask to the image of a track bar. It generates a DrawTrackBar event so that the event handler can apply the mask.

Canvas is the canvas on which to apply the mask.

Rect indicates the dimensions of the track bar object.

Horizontal indicates whether the track bar has a horizontal orientation.

TickAbove indicates whether the track bar includes tick marks above the slider groove.

TickBelow indicates whether the track bar includes tick marks below the slider groove.

DoDrawTrackBarMask returns the value of the DrawTrackBarMask event handler’s DefaultDraw parameter.


TStyle.DoExtraMenuItemWidth
 CLX Reference

TStyle.DoExtraMenuItemWidth

TStyle	See also

Generates an ExtraMenuItemWidth event.

procedure DoExtraMenuItemWidth(Source: TObject; HasCheckmark: Boolean; ImageWidth: Integer; FontMetrics: QFontMetricsH; var ExtraWidth: Integer); virtual;

Description

DoExtraMenuItemWidth is called automatically when an applicatin needs to determine how many pixels should be alloted to the width of menu items beyond those needed to render the text. It generates an ExtraMenuItemWidth event so that the event handler can calculate and return this value.

Source is the object that represents the menu.

HasCheckmark indicates whether the menu items must leave space for check marks or other images.

ImageWidth is the maximum width of all bitmaps used to display the images that HasCheckmark indicates are present.

FontMetrics is a handle to the Qt object that defines the font metrics used to draw the menu’s text.

ExtraWidth returns the width that should be added to all menu items beyond that required to draw the menu item text.


TStyle.DoGetItemRect
 CLX Reference

TStyle.DoGetItemRect

TStyle	See also

Generates a GetItemRect event.

procedure DoGetItemRect(Canvas: TCanvas; var Rect: TRect; Flags: Integer; Enabled: Boolean; Bitmap: TBitmap; const Text: WideString);

Description

DoGetItemRect is called automatically when the application needs to determine where to place the bitmap or label that appears on a widget (for example, the label on a control, an item that appears in a list or combo box, or similar item). It generates a GetItemRect event so that the event handler can adjust the Rect parameter to indicate the appropriate placement.

Canvas is the canvas on which the item will be drawn.

Rect represents the boundaries of where the text or bitmap is drawn. On entry, this is the total space allotted for drawing the item (the surface of a button, the label area on a control, the area allotted to an item in a list box, and so on.) DoGetItemRect adjusts this value to indicate precisely where the text or bitmap should be drawn.

Flags indicate features of the item to be drawn.

Enabled indicates whether the item is enabled.

Bitmap is the bitmap that is to be drawn (if it is a bitmap).

Text is the text that is to be written (if it is text).


TStyle.DoHeaderSectionRect
 CLX Reference

TStyle.DoHeaderSectionRect

TStyle	See also

Generates a HeaderSectionRect event.

procedure DoHeaderSectionRect(var Rect: TRect); virtual;

Description

DoHeaderSectionRect is called automatically when an application needs to determine where to draw a section in a header control. It generates a HeaderSectionRect event to obtain this value.

Rect specifies the boundaries of header section. On entry, this indicates the dimensions of the entire header section. DoHeaderSectionRect adjusts this value.


TStyle.DoMenuItemHeight
 CLX Reference

TStyle.DoMenuItemHeight

TStyle	See also

Generates a HeaderSectionRect event.

procedure DoMenuItemHeight(Source: TObject; Checkable: Boolean; FontMetrics: QFontMetricsH; var Height: Integer); virtual;

Description

DoMenuItemHeight is called automatically when an application needs to determine the height needed to paint a menu item. It generates a MenuItemHeight event to obtain this value.

Source is the TMenuItem that needs to be drawn.

Checkable indicates whether the menu item can include a checkmark or other selection indicator.

FontMetrics is a handle to the Qt object that represents the metrics of the font that will be used to draw the menu item’s text.

Height returns the total height needed to render the menu item.


TStyle.DoScrollBarMetrics
 CLX Reference

TStyle.DoScrollBarMetrics

TStyle	See also

Generates a ScrollBarMetrics event.

procedure DoScrollBarMetrics(ScrollBar: QScrollBarH; var SliderMin, SliderMax, SliderLength, ButtonSize: Integer); virtual;

Description

DoScrollBarMetrics is called when an application needs to determine the size required for various parts of a scrollbar. It generates a ScrollBarMetrics event to obtain the size of the slider and the arrow buttons, and then calculates the position of the thumb track from that.

ScrollBar is the handle to the scroll bar widget that needs to be drawn.

SliderMin is the number of pixels from the edge of the scroll bar to the beginning of the thumb track.

SliderMax is the number of pixels from the edge of the scroll bar to the end of the thumb track.

SliderLength is the length that should be allotted to the thumb tab.

ButtonSize is the length of the arrow buttons that appear on either end of the thumb track.


TStyle.DoSubmenuIndicatorWidth
 CLX Reference

TStyle.DoSubmenuIndicatorWidth

TStyle	See also

Generates a SubmenuIndicatorWidth event.

procedure DoSubmenuIndicatorWidth(FontMetrics: QFontMetricsH; var Width: Integer); virtual;

Description

DoSubmenuIndicatorWidth is called when an application needs to determine the space required for the indicator on a menu item that has a submenu.

FontMetrics is a handle to the Qt object that represents the metrics of that font that is used for the menu item’s text.

Width returns the number of pixels needed (in width) to draw the indicator.


TStyle.DoTabMetrics
 CLX Reference

TStyle.DoTabMetrics

TStyle	See also

Generates a TabMetrics event.

procedure DoTabMetrics(Source: TObject; var HorizontalPadding, VerticalPadding, Overlap: Integer); virtual;

Description

DoDrawTabMask is called automatically when the application needs to determine the amount of space to allot to various parts of a tab on a tabbed control. It generates a TabMetrics event so that the event handler can supply these values.

Source is the tabbed control that contains the tab.

HorizontalPadding returns the number of pixels that must appear between the edge of the tab and its label.

VerticalPadding returns the number of pixels that must appear between the top of the tab and its label.

Overlap returns the number of pixels by which tabs overlap.


TStyle.GetHooks
 CLX Reference

TStyle.GetHooks

TStyle	See also

Returns the value of the Hooks property.

function GetHooks: QClxStyleHooksH;

Description

GetHooks is the read access method of the Hooks property.


TStyle.HandleNeeded
 CLX Reference

TStyle.HandleNeeded

TStyle	See also

Ensures that the Handle property has an assigned value.

procedure HandleNeeded;

Description

HandleNeeded is used internally to ensure that the underlying Qt style object exists. For example, HandleNeeded is called automatically when an application reads the Handle property.

HandleNeeded checks that this TStyle has a handle to a Qt style object. If not, it calls CreateHandle to obtain one, and assigns the resulting handle to the Handle property.


TStyle.Refresh
 CLX Reference

TStyle.Refresh

TStyle

Updates the underlying Qt Style object to reflect the properties and events of this TStyle object.

procedure Refresh;

Description

Use Refresh to update the underlying Qt Style object so that it reflects the current property settings and uses the assigned event handlers.

Whenever an application sets a property or assigns an event handler on the TStyle object, the property setter automatically calls Refresh to ensure that the change is propagated to the underlying Qt Style object.


TStyle.StyleDestroyed
 CLX Reference

TStyle.StyleDestroyed

TStyle	See also

Responds when the underlying Qt style object is destroyed.

procedure StyleDestroyed; virtual;

Description

StyleDestroyed is called automatically when the underlying Qt style object is freed. In TStyle, it detaches the method that obtains notifications from the object specified by Hooks, and sets the value of the Handle and Hooks properties to nil.

Descendant classes that override this method should call the inherited method so that TStyle can clean up properly when the Qt style object is freed.


TStyle.StyleDestroyedHook
 CLX Reference

TStyle.StyleDestroyedHook

TStyle	See also

Responds when the underlying Qt style object is destroyed.

procedure StyleDestroyedHook; cdecl;

Description

StyleDestroyedHook is the callback that is assigned to the object identified by Hooks that responds to notifications when the underlying is freed. It calls the virtual StyleDestroyed method, which performs all necessary cleanup.

The call to StyleDestroy is wrapped in a try..except block, so that StyleDestroyedHook can handle any exceptions that are raised by calling the application object’s HandleException method.


Hierarchy

TObject

TStyle


TTabControl
 CLX Reference

 TTabControl

Hierarchy	Properties	Methods	Events	Using TTabControl	See also

TTabControl is a tab set that has the appearance of notebook dividers.

Unit

QComCtrls

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.


 CLX Reference

TTabControl properties

TTabControl	Alphabetically	Legend

Derived from TCustomTabControl

HotTrack

Images

MultiLine

MultiSelect

RaggedRight

RowCount

ScrollOpposite

ShowFrame

Style

TabHeight

TabIndex

Tabs

TabWidth

Derived from TCustomControl

Canvas

Derived from TWidgetControl

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TTabControl properties

TTabControl	By object	Legend

Action

Align

Anchors

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HotTrack

Images

Left

MultiLine

MultiSelect

Name

Owner

Parent

ParentFont

ParentShowHint

ParentWidget

PopupMenu

RaggedRight

RowCount

ScrollOpposite

ShowFrame

ShowHint

Showing

Style

TabHeight

TabIndex

TabOrder

Tabs

TabStop

TabWidth

Tag

Top

Visible

Width


 CLX Reference

TTabControl events

TTabControl	Alphabetically	Legend

Derived from TCustomTabControl

OnChange

OnChanged

OnDrawTab

OnGetImageIndex

Derived from TWidgetControl

OnEnter

OnExit

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDrag


 CLX Reference

TTabControl events

TTabControl	By object	Legend

OnChange

OnChanged

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnGetImageIndex

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDrag


 CLX Reference

TTabControl methods

TTabControl	Alphabetically	Legend

Derived from TCustomTabControl

BeginUpdate

Create

Destroy

IndexOfTabAt

RowCount

ScrollTabs

TabRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TCustomControl

Invalidate

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TTabControl methods

TTabControl	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BeginUpdate

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

IndexOfTabAt

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

RowCount

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollTabs

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

TabRect

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomControl

TCustomTabControl

TTabControl


TTabSheet
 CLX Reference

TTabSheet

Hierarchy	Properties	Methods	Events	See also

TTabSheet is an individual page in a TPageControl object.

Unit

QComCtrls

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.


 CLX Reference

TTabSheet Properties

TTabSheet	Alphabetically	Legend

In TTabSheet

BorderWidth

Highlighted

ImageIndex

PageControl

PageIndex

TabIndex

TabVisible

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TTabSheet Properties

TTabSheet	By Object	Legend

Action

Align

Anchors

BorderWidth

BoundsRect

Brush

Caption

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Highlighted

Hint

ImageIndex

Left

Name

Owner

PageControl

PageIndex

Parent

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ShowHint

Showing

TabIndex

TabOrder

TabStop

TabVisible

Tag

Top

Visible

Width


TTabSheet.BorderWidth
 CLX Reference

TTabSheet.BorderWidth

TTabSheet

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.


TTabSheet.Highlighted
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TTabSheet Events

TTabSheet	Alphabetically	Legend

In TTabSheet

OnHide

OnShow

Derived from TWidgetControl

OnEnter

OnExit

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDrag


 CLX Reference

TTabSheet Events

TTabSheet	By Object	Legend

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnHide

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnShow

OnStartDrag


TTabSheet.OnHide
 CLX 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
 CLX 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.


 CLX Reference

TTabSheet Methods

TTabSheet	Alphabetically	Legend

In TTabSheet

AdjustClientRect

Create

Destroy

DoHide

DoShow

EnabledChanged

InitWidget

ReadState

ShowingChanged

TextChanged

Derived from TCustomControl

Invalidate

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TTabSheet Methods

TTabSheet	By Object	Legend

AdjustClientRect

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

DoHide

DoShow

DragDrop

Dragging

EnableAlign

EnabledChanged

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

ReadState

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

ShowingChanged

TextChanged

Update

UpdateAction

UpdateControlState


TTabSheet.AdjustClientRect
 CLX Reference

TTabSheet.AdjustClientRect

TTabSheet	See also

Provides the interface that adjusts the ClientRect property for idiosyncrasies of the window.

procedure AdjustClientRect(var Rect: TRect); override;

Description

TTabSheet overrides AdjustClientRect to add space for the tab sheet border.


TTabSheet.Create
 CLX 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
 CLX 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.DoHide
 CLX 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
 CLX 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.EnabledChanged
 CLX Reference

TTabSheet.EnabledChanged

TTabSheet

Respond to change in Enabled property.

procedure EnabledChanged; override;

Description

TTabSheet overrides EnabledChanged in order to update the state information for the tab in the page control.


TTabSheet.InitWidget
 CLX Reference

TTabSheet.InitWidget

TTabSheet	See also

Initializes the underlying Qt widget

procedure InitWidget; override;

Description

TTabSheet overrides InitWidget in order to instruct the underlying Qt widget not to accept the focus.


TTabSheet.ReadState
 CLX 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.


TTabSheet.ShowingChanged
 CLX Reference

TTabSheet.ShowingChanged

TTabSheet	See also

Respond to change in Showing property.

procedure ShowingChanged; override;

Description

TTabSheet overrides ShowingChanged in order to call DoHide or DoShow, as appropriate.


TTabSheet.TextChanged
 CLX Reference

TTabSheet.TextChanged

TTabSheet	See also

Notify control that text or caption has changed.

procedure TextChanged; dynamic;

Description

TTabSheet overrides TextChanged in order to update the tab text.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomControl

TTabSheet


TCustomViewControl
 CLX Reference

TCustomViewControl

Hierarchy	Properties	Methods	Events

Base class for view controls.

Unit

QComCtrls

Description

TCustomViewControl is a base class for controls that display views of information in linear or hierarchial lists. View information is organized into item objects, which are instances of classes descended from TCustomViewItem. A set of helper classes, descended from TCustomViewItems, provide objects that manage items on behalf of their views and act as owners of the items.

The Images property can refer to an image list that provides item icons. Some view classes provide additional image lists for state-dependent item icons.

In hierarchical views, items are organized into tree-like displays, where each item has a parent-child relationship with its subordinate items. Parent items can be expanded or collapsed to display or hide their children.

In both linear and hierarchical views, items can have subitems that are shown in a spreadsheet-style display. A subitem is only visible if ShowColumnHeaders is True and a sufficient number of columns are defined. Subitems have no object type of their own; they are defined by lists of item captions and icons maintained by the item objects.

Two important descendents of TCustomViewControl are TCustomListView, which specializes in linear views, and TCustomTreeView, which specializes in hierarchical views. The following table lists these three classes with their related item and item-management classes:

View Class	Item Class	Item Manager Class
TCustomViewControl	TCustomViewItem	TCustomViewItems
TCustomListView	TListItem	TListItems
TCustomTreeView	TTreeNode	TTreeNodes
Views are not containers for items, and do not own the item objects. The view object owns the item manager object (defined by its Items property). The item manager object in turn owns the item objects.


 CLX Reference

TCustomViewControl Properties

TCustomViewControl	Alphabetically	Legend

In TCustomViewControl

ColumnClick

ColumnMove

ColumnResize

Columns

Images

Indent

MultiSelect

OwnerDraw

ReadOnly

RowSelect

SelCount

ShowColumnHeaders

ShowColumnSortIndicators

SortColumn

SortDirection

Sorted

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomViewControl Properties

TCustomViewControl	By Object	Legend

Action

Align

Anchors

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ColumnClick

ColumnMove

ColumnResize

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Images

Indent

Left

MultiSelect

Name

Owner

OwnerDraw

Parent

ParentColor

ParentWidget

ReadOnly

RowSelect

SelCount

ShowColumnHeaders

ShowColumnSortIndicators

ShowHint

Showing

SortColumn

SortDirection

Sorted

TabOrder

TabStop

Tag

Top

Visible

Width


TCustomViewControl.ColumnClick
 CLX Reference

TCustomViewControl.ColumnClick

TCustomViewControl

Determines whether the column headers behave like buttons.

property ColumnClick: Boolean;

Description

If ColumnClick is True, column headers look and behave like buttons. Clicking on a header produces a button-style animation and calls the OnColumnClick event handler. If ColumnClick and Sorted are both True, clicking on a column header sorts the view by that column; if the view is already sorted by the selected column, the sort order is reversed.


TCustomViewControl.ColumnMove
 CLX Reference

TCustomViewControl.ColumnMove

TCustomViewControl

Determines whether user can drag columns to new position.

property ColumnMove: Boolean;

Description

When the ColumnMove property is True (default), the user can rearrange columns by dragging them to new positions.


TCustomViewControl.ColumnResize
 CLX Reference

TCustomViewControl.ColumnResize

TCustomViewControl

Enable/disable resizing for all columns.

property ColumnResize: Boolean;

Description

When the ColumnResize property is changed from True  to False, or from False to True, the AllowResize property of each column is set to match.


TCustomViewControl.Columns
 CLX Reference

TCustomViewControl.Columns

TCustomViewControl	See also 	Example

Describes the properties of the columns in the view.

property Columns: TListColumns;

Description

Use Columns to add or delete columns in the 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.


TCustomViewControl.Images
 CLX Reference

TCustomViewControl.Images

TCustomViewControl	See also

Refers to image list associated with the view.

property Images: TCustomImageList;

Description

Use Images to provide a customized list of bitmaps that can be displayed with the item's label. Use the ImageIndex property to specify the item's default image. Some item types have additional index property to specify their images in various states.


TCustomViewControl.Indent
 CLX Reference

TCustomViewControl.Indent

TCustomViewControl	See also	Example

Specifies the amount of indentation in pixels when a list of child nodes is expanded.

property Indent: Integer;

Description

Indent is used in views that use hierarchical lists. Use Indent to determine how far child items are indented from their parent.


TCustomViewControl.MultiSelect
 CLX Reference

TCustomViewControl.MultiSelect

TCustomViewControl	See also

Determines whether the user can select more than one list item at a time.

property MultiSelect: Boolean;

Description

If MultiSelect is True, the user can select multiple items. If MultiSelect if False, only one item can be selected at a time.


TCustomViewControl.OwnerDraw
 CLX Reference

TCustomViewControl.OwnerDraw

TCustomViewControl	See also

Enable owner draw events.

property OwnerDraw: Boolean;

Description

Set OwnerDraw to True to enable events that allow the control to draw itself. The specific response to this property is determined by the descendent classes.


TCustomViewControl.ReadOnly
 CLX Reference

TCustomViewControl.ReadOnly

TCustomViewControl	See also

Determines whether the user can change the contents of the control.

property ReadOnly: Boolean;

Description

Use ReadOnly to determine whether the view can be used to enter data. If ReadOnly is True, list view displays values that the user can’t edit. If ReadOnly is False, the user can modify the contents.


TCustomViewControl.RowSelect
 CLX Reference

TCustomViewControl.RowSelect

TCustomViewControl	See also

Determines whether selection is by row.

property RowSelect: Boolean;

Description

If RowSelect is True selections consist of entire rows. If RowSelect is False, selections consist of individual items.


TCustomViewControl.SelCount
 CLX Reference

TCustomViewControl.SelCount

TCustomViewControl	See also

Specifies the number of selected items in the 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 items.

Note:	SelCount can only exceed 1 if the MultiSelect property is True.


TCustomViewControl.ShowColumnHeaders
 CLX Reference

TCustomViewControl.ShowColumnHeaders

TCustomViewControl	See also

Determines whether the column headers are displayed.

property ShowColumnHeaders: Boolean;

Description

Set ShowColumnHeaders to specify whether column headers should be displayed.

Not that TListView uses but does not publish ShowColumnHeaders. In code inherited from TCustomListView, ShowColumnHeaders is set to True when ViewStyle is set to vsReport and False ViewStyle is set to any other value..


TCustomViewControl.ShowColumnSortIndicators
 CLX Reference

TCustomViewControl.ShowColumnSortIndicators

TCustomViewControl	See also

Show an indicator in the sorted column.

property ShowColumnSortIndicators: Boolean;

Description

If ShowColumnSortIndicators and Sorted are both True, an indicator in one of the column headers show the column sorted by and the direction of the sort.


TCustomViewControl.SortColumn
 CLX Reference

TCustomViewControl.SortColumn

TCustomViewControl	See also

Column sorted by.

property SortColumn: Integer;

Description

If Sorted is True, SortColumn determines which column is used to sort the view. Columns are numbered from 0, which is the default.


TCustomViewControl.SortDirection
 CLX Reference

TCustomViewControl.SortDirection

TCustomViewControl	See also

Column sorted by.

property SortDirection: TSortDirection;

Description

SortDirection determines whether rows are sorted in ascending (sdAscending) or descending (sdDescending) order.


TCustomViewControl.Sorted
 CLX Reference

TCustomViewControl.Sorted

TCustomViewControl	See also

Column sorted by.

property Sorted: Boolean;

Description

Sorted determines whether rows are sorted automatically.


 CLX Reference

TCustomViewControl Events

TCustomViewControl	Alphabetically	Legend

In TCustomViewControl

OnColumnClick

OnColumnDragged

OnColumnResize

OnCustomDrawBranch

OnCustomDrawItem

OnCustomDrawSubItem


 CLX Reference

TCustomViewControl Events

TCustomViewControl	By Object	Legend

OnColumnClick

OnColumnDragged

OnColumnResize

OnCustomDrawBranch

OnCustomDrawItem

OnCustomDrawSubItem


TCustomViewControl.OnColumnClick
 CLX Reference

TCustomViewControl.OnColumnClick

TCustomViewControl	Example

Occurs when the user clicks on a column header.

type TViewColumnClickEvent = TViewColumnEvent;

     TViewColumnEvent =procedure(Sender: TObject; Column: TListColumn) of object;

property OnColumnClick: TViewColumnClickEvent;

Description

Write an OnColumnClick event handler to respond to clicks made in the column header when ColumnClick is True. The Column parameter is the object from the Columns property that describes the column that was clicked.


TCustomViewControl.OnColumnDragged
 CLX Reference

TCustomViewControl.OnColumnDragged

TCustomViewControl

Occurs when a column is dragged to a new position.

type TViewColumnMovedEvent = TViewColumnEvent;

     TViewColumnEvent = procedure(Sender: TObject; Column: TListColumn) ofobject;

property OnColumnDragged: TViewColumnMovedEvent;

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 view repaints to reflect the change.

Tip:	To uniquely identify columns so that you can recognize them after they are repositioned, use the list column’s Tag property.


TCustomViewControl.OnColumnResize
 CLX Reference

TCustomViewControl.OnColumnResize

TCustomViewControl

Occurs when a column is resized.

type TViewColumnResizeEvent = TViewColumnEvent;

     TViewColumnEvent = procedure(Sender: TObject; Column: TListColumn) ofobject;

property OnColumnResize: TViewColumnResizeEvent;

Description

Write an OnColumnResize event handler to respond when the user resizes a column.


TCustomViewControl.OnCustomDrawBranch
 CLX Reference

TCustomViewControl.OnCustomDrawBranch

TCustomViewControl	See also

Occurs when the connections between an item and its branched items need to be drawn.

TCustomDrawViewItemEvent = procedure(Sender: TCustomViewControl; Item: TCustomViewItem; Canvas: TCanvas; const Rect: TRect; State: TCustomDrawState; Stage: TCustomDrawStage; var DefaultDraw: Boolean) ofobject;

property OnCustomDrawBranch: TCustomDrawViewItemEvent;

Description

If an OnCustomDrawBranch event handler, if defined, is called when the connections between an item and its branched items need to be drawn. This event handler is called even if the OwnerDraw property is False. The OnCustomDrawBranch event handler is called at each stage in the drawing process, Stage indicating the current stage.

Sender is the view whose item is to be drawn.

Item is the parent item for the branches.

Canvas is the TCanvas object to draw to. Output to Canvas is automatically clipped to the branch area.

Rect gives the boundaries of the branch area.

State indicates the state of the item (selected, disabled, etc.).

Set DefaultDraw to False if you don't want to use the built-in branch drawing features. If DefaultDraw remains True, the view adds the branch lines to the image on the canvas.


TCustomViewControl.OnCustomDrawItem
 CLX Reference

TCustomViewControl.OnCustomDrawItem

TCustomViewControl	See also 	Example

Occurs when an item must be rendered.

TCustomDrawViewItemEvent = procedure(Sender: TCustomViewControl; Item: TCustomViewItem; Canvas: TCanvas; const Rect: TRect; State: TCustomDrawState; Stage: TCustomDrawStage; var DefaultDraw: Boolean) ofobject;

property OnCustomDrawItem: TCustomDrawViewItemEvent;

Description

If an OnCustomDrawItem event handler is defined, is called whenever an item needs to be drawn. This event handler is called even if the OwnerDraw property is False. The OnCustomDrawItem event handler is called at each stage in the drawing process, Stage indicating the current stage.

Sender is the list view whose item is to be drawn.

Item is the item that needs to be rendered.

Canvas is the TCanvas object to draw to. Output to Canvas is automatically clipped to the item's area.

Rect gives the item's boundaries on Canvas.

State indicates the state of the item (selected, disabled, etc.).

Set DefaultDraw to False if you don't want to use the built-in item drawing features. If DefaultDraw remains True, the view adds the item’s text to the image on the canvas.


TCustomViewControl.OnCustomDrawSubItem
 CLX Reference

TCustomViewControl.OnCustomDrawSubItem

TCustomViewControl	See also 	Example

Occurs when subitem must be rendered.

type TCustomDrawViewSubItemEvent = procedure(Sender: TCustomViewControl; Item: TCustomViewItem; SubItem: Integer; Canvas: TCanvas; const Rect: TRect; State: TCustomDrawState; Stage: TCustomDrawStage; var DefaultDraw: Boolean) ofobject;

property OnCustomDrawSubItem: TCustomDrawViewSubItemEvent;

Description

If an OnCustomDrawSubItem event handler is defined, is called whenever subitem needs to be drawn. This event handler is called even if the OwnerDraw property is False. The OnCustomDrawSubItem event handler is called at each stage in the drawing process, Stage indicating the current stage.

Sender is the list view whose subitem is to be drawn.

Subitem is the subitem that needs to be rendered.

Canvas is the TCanvas object to draw to. Output to Canvas is automatically clipped to the subitem's area.

Rect gives the item's boundaries on Canvas.

State indicates the state of the item (selected, disabled, etc.).

Set DefaultDraw to False if you don't want to use the built-in item drawing features. If DefaultDraw remains True, the view adds the item’s text to the image on the canvas.


 CLX Reference

TCustomViewControl Methods

TCustomViewControl	Alphabetically	Legend

In TCustomViewControl

BeginAutoDrag

ColorChanged

CreateEditor

DoCustomDrawViewBranch

DoCustomDrawViewItem

DoCustomDrawViewSubItem

DoDrawItem

DoEdited

DoEditing

DoGetImageIndex

ImageListChanged

InvertSelection

IsCustomDrawn

IsEditing

IsOwnerDrawn

NeedKey

Notification

Sort

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomViewControl Methods

TCustomViewControl	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginAutoDrag

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ColorChanged

ContainsControl

ContentsRect

ControlAtPos

CreateEditor

CreateParented

CreateParentedControl

DefaultHandler

DestroyComponents

Destroying

DisableAlign

Dispatch

DoCustomDrawViewBranch

DoCustomDrawViewItem

DoCustomDrawViewSubItem

DoDrawItem

DoEdited

DoEditing

DoGetImageIndex

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

ImageListChanged

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvertSelection

InvokeHelp

IsCustomDrawn

IsEditing

IsImplementorOf

IsOwnerDrawn

MethodAddress

MethodName

NeedKey

NewInstance

Notification

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Sort

Update

UpdateAction

UpdateControlState


TCustomViewControl.BeginAutoDrag
 CLX Reference

TCustomViewControl.BeginAutoDrag

TCustomViewControl	See also

Begin Automatic Drag.

procedure BeginAutoDrag; override;

Description

TCustomViewControl overrides BeginAutoDrag in order to disable immediate dragging. This means that a dragging event will not occur until the control has moved past the threshold specified by Threshold property of the global Mouse variable.


TCustomViewControl.ColorChanged
 CLX Reference

TCustomViewControl.ColorChanged

TCustomViewControl	See also

Notify control of color change.

procedure ColorChanged; override;

Description

TCustomViewControl overrides ColorChanged in order to completely redraw the view.


TCustomViewControl.CreateEditor
 CLX Reference

TCustomViewControl.CreateEditor

TCustomViewControl

Creates the inplace editor that allows items and subitems be edited.

function CreateEditor: TItemEditor; virtual;

Description

CreateEditor is called automatically to provide the edit box that the user uses to edit the item or subitem text. As implemented in TCustomViewControl, CreateEditor simply instantiates a TItemEditor control owned by the view control.


TCustomViewControl.DoCustomDrawViewBranch
 CLX Reference

TCustomViewControl.DoCustomDrawViewBranch

TCustomViewControl

Respond to branch draw in custom-drawn control

function DoCustomDrawViewBranch(Item: TCustomViewItem; Canvas: TCanvas; const Rect: TRect; State: TCustomDrawState; Stage: TCustomDrawStage): Boolean; virtual;

Description

TCustomDrawViewBranch is called automatically when a custom-drawn view needs to draw branch lines between an item and its branched items need to be drawn. If DoCustomDrawViewBranch returns True, the view adds the branch lines to the image on the canvas. If DoCustomDrawViewBranch returns False, it assumes full responsbility for drawing the branch connections.

Item is the parent item for the branches.

Canvas is the TCanvas object to draw to. Output to Canvas is automatically clipped to the branch area.

Rect gives the boundaries of the branch area.

State indicates the state of the item (selected, disabled, etc.).

Stage is current stage of drawing.

As implemented in TCustomViewControl, DoCustomDrawViewBranch calls the OnCustomDrawBranch event handler, and returns the value of its DefaultDraw parameter.


TCustomViewControl.DoCustomDrawViewItem
 CLX Reference

TCustomViewControl.DoCustomDrawViewItem

TCustomViewControl

Respond to item draw request in custom-drawn control

function DoCustomDrawViewItem(Item: TCustomViewItem; Canvas: TCanvas; const Rect: TRect; State: TCustomDrawState; Stage: TCustomDrawStage): Boolean; virtual;

Description

TCusomDrawViewBranch is called automatically when a custom-drawn view needs to draw an item. If DoCustomDrawViewItem returns True, the draws the normal icon and caption in addition to any custom drawing. If DoCustomDrawViewItem returns False, it assumes full responsbility for drawing the item.

Item is the item to be drawn.

Canvas is the TCanvas object to draw to. Output to Canvas is automatically clipped to the item area.

Rect gives the boundaries of the item area.

State indicates the state of the item (selected, disabled, etc.).

Stage is current stage of drawing.

As implemented in TCustomViewControl, DoCustomDrawViewItem calls the OnCustomDrawItem event handler, and returns the value of its DefaultDraw parameter.


TCustomViewControl.DoCustomDrawViewSubItem
 CLX Reference

TCustomViewControl.DoCustomDrawViewSubItem

TCustomViewControl

Respond to subitem draw request in custom-drawn control

function DoCustomDrawViewSubItem(Item: TCustomViewItem; SubItem: Integer; Canvas: TCanvas; const Rect: TRect; State: TCustomDrawState; Stage: TCustomDrawStage): Boolean; virtual;

Description

TCusomDrawViewBranch is called automatically when a custom-drawn view needs to draw a subitem. If DoCustomDrawViewSubItem returns True, the control draws the normal icon and caption in addition to any custom drawing. If DoCustomDrawViewSubItem returns False, it assumes full responsbility for drawing the subitem.

Item and SubItem specify the subitem to be drawn. Subitem is an index for the SubItems and SubItemImages properties of Item.

Canvas is the TCanvas object to draw to. Output to Canvas is automatically clipped to the branch area.

Rect gives the boundaries of the subitem area.

State indicates the state of the subitem (selected, disabled, etc.).

Stage is current stage of drawing.

As implemented in TCustomViewControl, DoCustomDrawViewSubItem calls the OnCustomDrawSubItem event handler, and returns the value of its DefaultDraw parameter.


TCustomViewControl.DoDrawItem
 CLX Reference

TCustomViewControl.DoDrawItem

TCustomViewControl

Draw item on owner-drawn view.

procedure DoDrawItem(Item: TCustomViewItem; Canvas: TCanvas; const Rect: TRect;

    State: TOwnerDrawState); virtual;

Description

DoDrawItem is called automatically when the view is owner-drawn and an item needs to be drawn.

Item is the item that needs to be drawn.

Rect defines the area of the item on the view’s canvas.

State indicates various conditions that can influence how the item is drawn, such as whether it is selected, grayed, or focused.

As implemented in TCustomViewControl, DoDrawItem does nothing. Descendent classes that use the OwnerDraw property should override DoDrawItem to provide the drawing framework for an owner-drawn control. For example, TCustomListView overrides DoDrawItem in order to call its OnDrawItem event handler.


TCustomViewControl.DoEdited
 CLX Reference

TCustomViewControl.DoEdited

TCustomViewControl	See also

Respond to item editing completion.

procedure DoEdited(AItem: TCustomViewItem; var S: WideString); dynamic;

Description

DoEdited is called automatically when editing of an item has been completed and accepted. As implemented in TCustomViewControl, DoEdited does nothing. Descendent classes can override this method to implement event handling.


TCustomViewControl.DoEditing
 CLX Reference

TCustomViewControl.DoEditing

TCustomViewControl	See also

Respond to item editing.

procedure DoEditing(AItem: TCustomViewItem; var AllowEdit: Boolean); dynamic;

Description

DoEditing is called automatically when a user attempts to edit an item. AItem is the item being edited. AllowEdit is set to true; if DoEditing changes AllowEdit to false, editing is canceled.

As implemented in TCustomViewControl, DoEditing does nothing. Descendent classes can override this method to implement event handling.


TCustomViewControl.DoGetImageIndex
 CLX Reference

TCustomViewControl.DoGetImageIndex

TCustomViewControl	See also

Implement image index events.

procedure DoGetImageIndex(item: TCustomViewItem); virtual;

Description

DoGetImageIndex is called automatically when the view is about to access an item's image index. The DoGetImageIndex implementation provides a place to modify the image index before it is used.

As implemented in TCustomViewControl, DoGetImageIndex does nothing.


TCustomViewControl.ImageListChanged
 CLX Reference

TCustomViewControl.ImageListChanged

TCustomViewControl

Respond to change in image list.

procedure ImageListChanged; virtual;

Description

ImageListChanged is called automatically when the control's image list has changed. As implemented in TCustomViewControl, ImageListChanged does nothing.


TCustomViewControl.InvertSelection
 CLX Reference

TCustomViewControl.InvertSelection

TCustomViewControl

Invert item selection.

procedure InvertSelection;

Description

If the MultiSelect property is True, InvertSelection selects all items that are current deselected, and deselects all items that are currently selected.

If the MultiSelect property is False, InvertSelection does nothing.


TCustomViewControl.IsCustomDrawn
 CLX Reference

TCustomViewControl.IsCustomDrawn

TCustomViewControl	See also

Determine when the view is considered custom drawn.

function IsCustomDrawn: Boolean; virtual;

Description

IsCustomDrawn is called automatically when the control needs to determine if it is custom-drawn. A custom-drawn view supports event handlers that allow the application to draw specific view details. Descendent classes can override IsCustomDrawn to change the criteria for considering a control custom-drawn.

As implemented in TCustomViewControl, IsCustomDrawn returns True  if IsOwnerDrawn returns True  or if event handlers are defined for any of the following events: OnCustomDrawItem, OnCustomDrawSubItem, OnCustomDrawBranch.


TCustomViewControl.IsEditing
 CLX Reference

TCustomViewControl.IsEditing

TCustomViewControl

Indicates whether any item in the 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 view.  IsEditing returns True if the user is editing an item, False otherwise.


TCustomViewControl.IsOwnerDrawn
 CLX Reference

TCustomViewControl.IsOwnerDrawn

TCustomViewControl	See also

Determine when the view is considered owner drawn.

function IsOwnerDrawn: Boolean; virtual;

Description

IsOwnerDrawn is called automatically when the control needs to determine if it is owner-drawn. An owner-drawn view supports event handlers that allow the application to draw some view details. Owner-drawn controls are more limited than custom-drawn controls, and are supported primarily for compatibility with VCL code.

As implemented in TCustomViewControl, IsOwnerDrawn always returns False. Descendent classes that support owner-drawn controls must override IsOwnerDrawn to define the rules for considering a control owner-drawn.


TCustomViewControl.NeedKey
 CLX Reference

TCustomViewControl.NeedKey

TCustomViewControl 	See also

Evaluate input key.

function NeedKey(Key: Integer; Shift: TShiftState; KeyText: string): Boolean; override;

Description

TCustomViewControl overrides NeedKey in order to filter out key presses that occur while Ctrl, Shift, or Alt are held down.


TCustomViewControl.Notification
 CLX Reference

TCustomViewControl.::Notification

TCustomViewControl	See also

Responds to notifications that components are being created or destroyed.

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

Description

TCustomViewControl overrides Notification in order to call ImageListChanged when the image list is removed.


TCustomViewControl.Sort
 CLX Reference

TCustomViewControl.::Sort

TCustomViewControl

Sort view.

procedure Sort(Column: Integer; Direction: TSortDirection);

Description

Sort immediately sorts the items in the view according to its parameters. It does this by assigning the Column parameter to the SortColumn property, the Direction parameter to the SortDirection property, and True  to the Sorted property.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomViewControl


TTextViewer
 CLX Reference

TTextViewer

Hierarchy	Properties	Methods	Events	See also

Basic rich text control.

Unit

QComCtrls

Description

TTextViewer is a basic implementation of the rich text control defined in TCustomTextViewer.


 CLX Reference

TTextViewer Properties

TTextViewer	Alphabetically	Legend

Derived from TCustomTextViewer

ChildHandle

DocumentTitle

Factory

FileName

Handle

IsTextSelected

LinkColor

Paper

SelectedText

Text

TextColor

TextFormat

UnderlineLink

Derived from TFrameControl

BorderStyle

ClientOrigin

Derived from TWidgetControl

Brush

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DragMode

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TTextViewer Properties

TTextViewer	By Object	Legend

Action

Align

Anchors

BorderStyle

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DocumentTitle

DragMode

Enabled

Factory

FileName

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

IsTextSelected

Left

LinkColor

Name

Owner

Paper

Parent

ParentShowHint

ParentWidget

PopupMenu

SelectedText

ShowHint

Showing

TabOrder

TabStop

Tag

Text

TextColor

TextFormat

Top

UnderlineLink

Visible

Width


 CLX Reference

TTextViewer Events

TTextViewer	Alphabetically	Legend

Derived from TWidgetControl

OnEnter

OnExit

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TTextViewer Events

TTextViewer	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TTextViewer Methods

TTextViewer	Alphabetically	Legend

Derived from TCustomTextViewer

CopyToClipboard

Create

Destroy

LoadFromFile

LoadFromStream

SelectAll

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TTextViewer Methods

TTextViewer	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomTextViewer

TTextViewer


TThreadList
 CLX 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.


 CLX Reference

TThreadList properties

TThreadList	Alphabetically	Legend

In TThreadList

Duplicates


 CLX Reference

TThreadList properties

TThreadList	By object	Legend

Duplicates


TThreadList.Duplicates
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TThreadList.Create

TThreadList

Creates and initializes a TThreadList instance.

constructor Create;

Description

The Create method generates a TThreadList object.


TThreadList.Destroy
 CLX 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
 CLX Reference

TThreadList.LockList

TThreadList	See also

Locks the thread-safe list and returns a TList object.

function  LockList: TList;

Description

LockList  returns the TList object that contains the list, after locking out all other threads.


TThreadList.Remove
 CLX 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
 CLX Reference

TThreadList.UnlockList

TThreadList	See also

Unlocks the thread-safe list.

procedure UnlockList;

Description

Use UnlockList after LockList to allow other threads access to the list.


Hierarchy

TObject

TThreadList


TThread
 CLX Reference

TThread

Hierarchy	Properties	Methods	Events	Using TThread	See also

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 CLX object and update a form must only be called from within the main 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.


 CLX Reference

TThread properties

TThread	Alphabetically	Legend

In TThread

FatalException

FreeOnTerminate

Handle

Policy

Priority

ReturnValue

Suspended

Terminated

ThreadID


 CLX Reference

TThread properties

TThread	By object	Legend

FatalException

FreeOnTerminate

Handle

Policy

Priority

ReturnValue

Suspended

Terminated

ThreadID


TThread.FatalException
 CLX 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
 CLX 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
 CLX Reference

TThread.Handle

TThread	See also

Contains the thread's handle.

type THandle = Integer;

property Handle: THandle;

Description

Use Handle when calling system functions for thread manipulation.


TThread.Policy
 CLX Reference

TThread.Policy

TThread	See also

Determines the schedule policy the thread uses.

property Policy: Integer;

Description

Policy is only available for applications that run under Linux. Set Policy to assign a Schedule policy for this thread vis-a-vis other threads on the system. The value of Policy must be one of the three constants listed below:

Policy	Type	Priority

SCHED_RR	Real Time	0-99

SCHED_FIFO	Real Time	0-99

SCHED_OTHER	Regular	0

Note:	The type of thread policy determines the Priority that can be assigned to the thread, as indicated in the third column of the table above.

Note:	The values SCHED_RR and SCHED_FIFO can only be set by root.


TThread.Priority
 CLX Reference

TThread.Priority

TThread	See also

Determines the thread's scheduling priority relative to other threads in the process.

property Priority: Integer;

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.

On Linux, Priority is an integer value (first declaration). A higher value (numerically) implies that the thread has greater priority. The possible values for priority depend on the value of the Policy property.

On Windows, Priority is a TThreadPriority value (second declaration). The possible values are listed in the following table:

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
 CLX 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
 CLX 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
 CLX Reference

TThread.Terminated

TThread	See also

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.


TThread.ThreadID
 CLX 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.

Note:	ThreadID is different than the thread’s handle in the Handle property.


 CLX Reference

TThread events

TThread	Alphabetically	Legend

In TThread

OnTerminate


 CLX Reference

TThread events

TThread	By object	Legend

OnTerminate


TThread.OnTerminate
 CLX 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 thread, which means CLX methods and properties can be called freely.


 CLX 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


 CLX 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
 CLX 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
 CLX Reference

TThread.Create

TThread	See also

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
 CLX 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
 CLX 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
 CLX Reference

TThread.Execute

TThread	See also

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
 CLX Reference

TThread.Resume

TThread	See also

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
 CLX 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
 CLX Reference

TThread.Synchronize

TThread	See also

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 CLX thread, thereby avoiding multi-thread conflicts. If you are unsure whether a method call is thread-safe, call it from within the main CLX thread by passing it to the Synchronize method.

Execution of the thread is suspended while Method is executing in the main CLX thread.

Note:	You can also protect unsafe methods using critical sections or the multi-read exclusive-write synchronizer.


TThread.Terminate
 CLX 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.

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
 CLX 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
 CLX Reference

 TTimer

Hierarchy	Properties	Methods	Events	Using TTimer

TTimer encapsulates the system timer functions.

Unit

QExtCtrls

Description

TTimer is used to simplify calling the system timer functions. 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.

Caution:	Limitations on the total number of timers system-wide are system dependent.


 CLX Reference

TTimer properties

TTimer	Alphabetically	Legend

In TTimer

Enabled

Handle

Interval

Derived from THandleComponent

Hooks

ParentWidget

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TTimer properties

TTimer	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Enabled

Handle

Hooks

Interval

Name

Owner

ParentWidget

Tag


TTimer.Enabled
 CLX Reference

TTimer.Enabled

TTimer	See also

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.Handle
 CLX Reference

TTimer.Handle

TTimer

Indicates the handle to the underlying widget that implements the timer.

property Handle: QTimerH;

Description

Handle is a 4-byte identifier that uniquely represents the underlying Widget that implements the timer. Use this handle when making low-level function calls into the Qt shared libraries, where the function call requires an instance handle.


TTimer.Interval
 CLX 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.


 CLX Reference

TTimer events

TTimer	Alphabetically	Legend

In TTimer

OnTimer


 CLX Reference

TTimer events

TTimer	By object	Legend

OnTimer


TTimer.OnTimer
 CLX 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.


 CLX Reference

TTimer methods

TTimer	Alphabetically	Legend

In TTimer

Create

Derived from THandleComponent

Destroy

HandleAllocated

HandleNeeded

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleAllocated

HandleNeeded

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TTimer.Create
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

THandleComponent

TTimer


TToolButtonActionLink
 CLX Reference

TToolButtonActionLink

Hierarchy	Properties	Methods	Events

TToolButtonActionLink is an action link designed for tool button control clients.

Unit

QComCtrls

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.


 CLX Reference

TToolButtonActionLink properties

TToolButtonActionLink	Alphabetically	Legend

Derived from TBasicActionLink

Action


 CLX Reference

TToolButtonActionLink properties

TToolButtonActionLink	By object	Legend

Action


 CLX Reference

TToolButtonActionLink events

TToolButtonActionLink	Alphabetically	Legend

Derived from TBasicActionLink

OnChange


 CLX Reference

TToolButtonActionLink events

TToolButtonActionLink	By object	Legend

OnChange


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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

QComCtrls

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.


 CLX Reference

TToolBar Properties

TToolBar	Alphabetically	Legend

In TToolBar

AutoSize

BorderWidth

ButtonHeight

ButtonWidth

Controls

DisabledImages

EdgeBorders

EdgeInner

EdgeOuter

Flat

HotImages

Images

Indent

List

ShowCaptions

Wrapable

Derived from TWidgetControl

Bitmap

Brush

ChildHandle

ClientOrigin

ClientRect

Enabled

Handle

Masked

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TToolBar Properties

TToolBar	By Object	Legend

Action

Align

Anchors

AutoSize

Bitmap

BorderWidth

BoundsRect

Brush

ButtonHeight

ButtonWidth

Caption

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DisabledImages

DragMode

EdgeBorders

EdgeInner

EdgeOuter

Enabled

Flat

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HotImages

Images

Indent

Left

List

Masked

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ShowCaptions

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width

Wrapable


TToolBar.AutoSize
 CLX Reference

 TToolBar.AutoSize

TToolBar	See also

Indicates whether the toolbar’s height changes automatically to accommodate the controls it contains.

property AutoSize: Boolean;

Description

If AutoSize is set to True, the height of the toolbar adjusts automatically so that the controls fit in it with no vertical margin.


TToolBar.Borderwidth
 CLX Reference

 TToolBar.BorderWidth

TTabSheet

Specifies the width of the tool bar’s border.

property BorderWidth: TBorderWidth;

Description

Use BorderWidth to get or set the width of the tool bar’s border in pixels. The controls that the tool bar contains appear within this distance from the edge of the tool bar.


TToolBar.ButtonHeight
 CLX 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.ButtonWidth
 CLX 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.Controls
 CLX Reference

TToolBar.Controls

TToolBar	See also

Lists all child controls.

property Controls[Index: Integer]: TControl;

Description

Controls is a list of the toolbar's child controls. These controls are the tool buttons that appear on the tool bar.


TToolBar.DisabledImages
 CLX 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.EdgeBorders
 CLX Reference

TToolBar.EdgeBorders

TTabSheet

Determines which sides of the toolbar have 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.


TToolBar.EdgeInner
 CLX Reference

TToolBar.EdgeInner

TTabSheet

Determines the border style for the toolbar's inner edge.

property EdgeInner: TEdgeStyle;

Description

Use EdgeInner to provide the toolbar with a three-dimensional beveled look. A toolbar 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.


TToolBar.EdgeOuter
 CLX Reference

TToolBar.EdgeOuter

TTabSheet

Determines the border style for the toolbar's outer edge.

property EdgeOuter: TEdgeStyle;

Description

Use EdgeOuter to provide the toolbar with a three-dimensional beveled look. A toolbar 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. The outer border 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.


TToolBar.Flat
 CLX 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.


TToolBar.HotImages
 CLX 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
 CLX 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
 CLX 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
 CLX 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.ShowCaptions
 CLX 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.Wrapable
 CLX 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.


 CLX Reference

TToolBar Events

TToolBar	Alphabetically	Legend

Derived from TWidgetControl

OnEnter

OnExit

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDrag


 CLX Reference

TToolBar Events

TToolBar	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDrag


 CLX Reference

TToolBar Methods

Legend

In TToolBar

AdjustClientRect

ButtonCount

ControlCount

ControlsAligned

ControlsListChanged

Create

CustomAlignInsertBefore

CustomAlignPosition

Destroy

DoResize

EventFilter

FontChanged

InitWidget

Invalidate

Loaded

Notification

Paint

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

ShowHintChanged

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TToolBar Methods

TToolBar	By Object	Legend

AdjustClientRect

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

ButtonCount

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

ControlCount

ControlsAligned

ControlsListChanged

Create

CreateParented

CreateParentedControl

CustomAlignInsertBefore

CustomAlignPosition

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DoResize

DragDrop

Dragging

EnableAlign

EndDrag

EventFilter

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

FontChanged

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

Loaded

MethodAddress

MethodName

NewInstance

Notification

Paint

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

ShowHintChanged

Update

UpdateAction

UpdateControlState


TToolBar.AdjustClientRect
 CLX Reference

TToolBar.AdjustClientRect

TToolBar	See also

Adjusts the ClientRect property for idiosyncrasies of the window.

procedure AdjustClientRect(var Rect: TRect); override;

Description

TToolBar overrides AdjustClientRect in order to make room for the borders and edges.


TToolBar.ButtonCount
 CLX Reference

TToolBar.ButtonCount

TToolBar	See also

Returns the number of buttons in the toolbar.

function ButtonCount: Integer;

Description

ButtonCount returns the number of child controls that are TToolButton objects.

To obtain the total number of child controls, including those that are not TToolButton objects, use the ControlCount method instead.


TToolBar.ControlCount
 CLX Reference

TToolBar.ControlCount

TToolBar	See also

Returns the number of controls in the toolbar.

function ControlCount: Integer;

Description

ControlCount returns the number of child controls listed by the Controls property.

To obtain the number of these controls that are TToolButton objects, use the ButtonCount method instead.


TToolBar.ControlsAligned
 CLX Reference

TToolBar.ControlsAligned

TToolBar	See also

Adjusts the toolbar after its child controls have been aligned.

procedure ControlsAligned: override;

Description

ControlsAligned is called automatically after the Align property of the toolbar’s child controls has been enforced. It performs any necessary adjustments to the toolbar itself to accommodate the changes.


TToolBar.ControlsListChanged
 CLX Reference

TToolBar.ControlsListChanged

TToolBar	See also

Responds when child controls are added to or removed from the tool bar.

procedure ControlsListChanged(Control: TControl; Inserting: Boolean); override;

Description

ControlsListChanged is called automatically after child controls are added to or removed from the tool bar. It adjusts the layout of the child controls to accommodate the change.

Control is the control that was just added to or removed from the toolbar.

Inserting is True if Control was just added, False if it was just removed.


TToolBar.Create
 CLX 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.CustomAlignInsertBefore
 CLX Reference

TToolBar.CustomAlignInsertBefore

TToolBar	See also

Returns the placement order of a custom-aligned child control.

function CustomAlignInsertBefore(C1, C2: TControl): Boolean; override;

Description

CustomAlignInsertBefore determines the order in which the toolbar assigns places to custom-aligned child controls. This method determines the order in which to place child controls that have an Align property of alCustom. Once the placement order is determined, the CustomAlignPosition method positions the custom-aligned children using the resulting placement order.

CustomAlignInsertBefore returns True if C2 should be presented before C1, and False otherwise.


TToolBar.CustomAlignPosition
 CLX Reference

TToolBar.CustomAlignPosition

TToolBar	See also

Computes the dimensions to use when positioning a custom-aligned child control.

procedure CustomAlignPosition(Control: TControl; var NewLeft, NewTop, NewWidth, NewHeight: Integer; var AlignRect: TRect); override;

Description

CustomAlignPosition is called to position custom-aligned child controls.

Control is the child control to position on the toolbar.

On entry, NewLeft, NewTop, NewWidth, and NewHeight give the current position and size of Control. On exit, they return the new boundaries of the child control that reflect where it should appear on the tool bar.

AlignRect is the client area of the tool bar where child controls can be placed. CustomAlignPosition may change this value to reflect the layout semantics of the toolbar.


TToolBar.Destroy
 CLX 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.DoResize
 CLX Reference

TToolBar.DoResize

TToolBar 	See also

Adjusts the size of the toolbar to fit its contents.

procedure DoResize;

void __fastcall DoResize(void);

Description

DoResize resizes the toolbar to fit around its child controls when the AutoSize property is True. If AutoSize is False, DoResize does nothing.


TToolBar.EventFilter
 CLX Reference

TToolBar.EventFilter

TToolBar 	See also

Responds to system events.

function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; override;

Description

EventFilter is called automatically in response to events detected by the underlying widget. Such events include mouse events, keyboard events, system changes (such as changes to the palette), and changes to the underlying widget (moves, resizes, or the need to repaint). EventFilter gives the control an opportunity to respond to the event that occurred.

Sender is the handle to the underlying widget that receives the event. Typically, this is the same as the Handle property.

Event is the handle to the Qt event object. Use this object to determine the type of event that occurred and obtain information about the event.

EventFilter returns True if the toolbar handles the event, False otherwise.

TToolBar overrides the inherited method to provide special handling for resize events.

Note:	When overriding the EventFilter method, be sure to call the inherited method so that the default event processing can occur.


TToolBar.FontChanged
 CLX Reference

TToolBar.FontChanged

TToolBar 	See also

Responds when the Font property changes.

procedure FontChanged; override;

Description

FontChanged is called automatically when the Font property changes. TToolBar overrides the inherited method to resize the tool buttons so that they reflect the new font.


TToolBar.InitWidget
 CLX Reference

TToolBar.InitWidget

TToolBar	See also

Initializes the underlying widget before it is displayed after it has been created.

procedure InitWidget; override;

Description

InitWidget is called internally after the underlying widget has been created but before the first paint. It initializes the widget after it has been created.

TToolBar overrides InitWidget in order to set the TabStop property to False.


TToolBar.Invalidate
 CLX Reference

TToolBar.Invalidate

TToolBar	See also

Indicates that the toolbar needs repainting.

procedure Invalidate; override;

Description

Use Invalidate when the entire toolbar needs to be repainted. When more than one region within the toolbar needs repainting, Invalidate causes 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 toolbar is actually repainted.

TToolBar overrides the inherited method in order to invalidate its child controls.


TToolBar.Loaded
 CLX 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
 CLX 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.Paint
 CLX Reference

TToolBar.Paint

TToolBar	See also

Renders the toolbar.

procedure Paint; override;

Description

Paint is called automatically when the toolbar needs to render its image. TToolBar overrides the inherited method in order to draw the background and borders of the toolbar.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomControl

TToolBar


TToolButton
 CLX Reference

TToolButton

Hierarchy	Properties	Methods	Events	See also	Example

TToolButton is a button control in a TToolBar object.

Unit

QComCtrls

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.


 CLX Reference

TToolButton Properties

TToolButton	Alphabetically	Legend

In TToolButton

AllowAllUp

AutoSize

Caption

Down

DropDownMenu

Grouped

ImageIndex

Indeterminate

Index

Marked

Name

Parent

Style

Toolbar

Wrap

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DragMode

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TToolButton Properties

TToolButton	By Object	Legend

Action

Align

AllowAllUp

Anchors

AutoSize

BoundsRect

Brush

Caption

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Down

DragMode

DropDownMenu

Enabled

Grouped

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Indeterminate

Index

Left

Marked

Name

Owner

Parent

ParentShowHint

ParentWidget

PopupMenu

ShowHint

Showing

Style

TabOrder

TabStop

Tag

Toolbar

Top

Visible

Width

Wrap


TToolButton.AllowAllUp
 CLX 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
 CLX 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.Caption
 CLX Reference

TToolButton.Caption

TToolButton	See also

Specifies button caption.

property Caption: TCaption;

Description

Use Caption to specify the caption displayed on the button.

To underline a character in a Caption that labels a tool button, include an ampersand (&) before the character. This type of character is called an accelerator character. The user can then select the tool button by pressing Alt while typing the underlined character. To display an ampersand character in the caption, use two ampersands (&&).


TToolButton.Down
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 Controls property array.


TToolButton.Marked
 CLX 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.Name
 CLX Reference

TToolButton.Name

TToolButton	See also

Specifies the name of the tool button as referenced in code.

property Name: TComponentName;

Description

Use Name to refer to the tool button instance in code. If the values of the Name and Caption properties are identical, changing the value of Name also changes the value of Caption.


TToolButton.Parent
 CLX Reference

TToolButton.Parent

TToolButton	See also

Indicates the control that visually contains the tool button.

property Parent: TWidgetControl;

Description

Use the Parent property to get or set the parent of this tool button. Parent should be a TToolBar object, because tool buttons are designed to work inside a tool bar. When assigning a TToolBar object to Parent, that object becomes the value of the ToolBar property as well.


TToolButton.Style
 CLX 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.Toolbar
 CLX Reference

TToolButton.Toolbar

TToolButton	See also

Specifies the toolbar in which this button appears.

property ToolBar: TToolBar;

Description

Use ToolBar to assign the button to a toolbar or to determine the toolbar in which this button appears. When you set ToolBar, the parent toolbar recomputes the layout of its buttons so that this button is included.

Note:	When you set ToolBar, the toolbar becomes the value of the Parent property as well.


TToolButton.Wrap
 CLX 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.


 CLX Reference

TToolButton Events

TToolButton	Alphabetically	Legend

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TToolButton Events

TToolButton	By Object	Legend

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TToolButton Methods

TToolButton	Alphabetically	Legend

In TToolButton

ChangeBounds

CheckMenuDropDown

Click

Create

Derived from TCustomControl

Destroy

Invalidate

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TToolButton Methods

TToolButton	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ChangeBounds

CheckMenuDropDown

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TToolButton.ChangeBounds
 CLX Reference

TToolButton.ChangeBounds

TToolButton	See also

Changes the position and size of the button in a single operation.

procedure ChangeBounds(ALeft, ATop, AWidth, AHeight: Integer); override;

Description

Call ChangeBounds to set the Left, Top, Width, and Height properties at once. By calling ChangeBounds, you guard against a paint operation occurring after one property is set and before the next, which can cause screen flicker.

ChangeBounds also provides the underlying implementation for setting these four properties.

As implemented in TToolButton, ChangeBounds 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.CheckMenuDropdown
 CLX 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
 CLX 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.


TToolButton.Create
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomControl

TToolButton


TTrackBar
 CLX Reference

 TTrackBar

Hierarchy	Properties	Methods	Events	Using TTrackBar	See also

TTrackBar is a wrapper for a track bar control.

Unit

QComCtrls

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.


 CLX Reference

TTrackBar Properties

TTrackBar	Alphabetically	Legend

In TTrackBar

Frequency

Handle

LineSize

Max

Min

Orientation

PageSize

Position

TickMarks

TickStyle

Derived from TWidgetControl

Bitmap

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Masked

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DragMode

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TTrackBar Properties

TTrackBar	By Object	Legend

Action

Align

Anchors

Bitmap

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Frequency

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

LineSize

Masked

Max

Min

Name

Orientation

Owner

PageSize

Parent

ParentShowHint

ParentWidget

PopupMenu

Position

ShowHint

Showing

TabOrder

TabStop

Tag

TickMarks

TickStyle

Top

Visible

Width


TTrackBar.Frequency
 CLX 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.Handle
 CLX Reference

TTrackBar.Handle

See also

Provides access to the window handle of the control.

property Handle: QClxSliderH

Description

Handle is a pointer to the Qt widget that underlies the control.


TTrackBar.LineSize
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.TickMarks
 CLX 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
 CLX 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.


 CLX Reference

TTrackBar Events

TTrackBar	Alphabetically	Legend

In TTrackBar

OnChange

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnStartDrag


 CLX Reference

TTrackBar Events

TTrackBar	By Object	Legend

OnChange

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnStartDrag


TTrackBar.OnChange
 CLX 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.


 CLX Reference

TTrackBar Methods

TTrackBar	Alphabetically	Legend

In TTrackBar

Create

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX 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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TTrackBar.Create
 CLX 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
 CLX 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

TWidgetControl

TTrackBar


TWidgetControlActionLink
 CLX Reference

TWidgetControlActionLink

Hierarchy	Properties	Methods	Events

TWidgetControlActionLink is an action link used by descendents of TWidgetControl.

Unit

QControls

Description

TWidgetControlActionLink is designed to link actions to controls based on TWidgetControl. TWidgetControlActionLink inherits support for linking actions with the properties of components and controls and adds support for linking the help context.


 CLX Reference

TWidgetControlActionLink properties

TWidgetControlActionLink	Alphabetically	Legend

Derived from TBasicActionLink

Action


 CLX Reference

TWidgetControlActionLink properties

TWidgetControlActionLink	By object	Legend

Action


 CLX Reference

TWidgetControlActionLink events

TWidgetControlActionLink	Alphabetically	Legend

Derived from TBasicActionLink

OnChange


 CLX Reference

TWidgetControlActionLink events

TWidgetControlActionLink	By object	Legend

OnChange


 CLX Reference

TWidgetControlActionLink methods

TWidgetControlActionLink	Alphabetically	Legend

In TWidgetControlActionLink

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


 CLX Reference

TWidgetControlActionLink methods

TWidgetControlActionLink	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


TWidgetControlActionLink.AssignClient
 CLX Reference

TWidgetControlActionLink.AssignClient

TWidgetControlActionLink

Specifies the client control.

procedure AssignClient(AClient: TObject); override;

Description

TWidgetControlActionLink overrides AssignClient to ensure that the client is a TWidgetControl object.


Hierarchy

TObject

TBasicActionLink

TActionLink

TControlActionLink

TWidgetControlActionLink


TWidgetControl
 CLX Reference

TWidgetControl

Hierarchy	Properties	Methods	Events	See also

TWidgetControl is the base class for all controls that are wrappers for Qt widgets.

Unit

QControls

Description

TWidgetControl provides the common functionality for all controls that act as wrappers for Qt screen objects (“widgets”). Controls that are wrap underlying widgets have the following features:

The control can incorporate the functionality of an underlying widget. 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 TWidgetControl can display standard screen objects provided by the Qt widget Library, or customized screen objects developed by the CLX programmer.

Descendants of TWidgetControl 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 TCustomHeaderControl, TCustomSpinEdit, TFrameControl, TButtonControl, TCustomComboBox, TCustomEdit, and TCustomListBox. When defining new control classes, consider these descendants before deriving directly from TWidgetControl.

Every TWidgetControl object has a Handle property which refers to the underlying Qt widget. In CLX, the Handle property is really a Qt object pointer; but is called a “handle” to maintain backward compatibility with VCL code. Use the Handle property to bypass the CLX API and directly access the underlying widget.


 CLX Reference

TWidgetControl Properties

TWidgetControl	Alphabetically	Legend

In TWidgetControl

Bitmap

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Hooks

InputKeys

Masked

Palette

Parent

ParentWidget

Showing

Style

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TWidgetControl Properties

TWidgetControl	By Object	Legend

Action

Align

Anchors

Bitmap

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Handle

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

Hooks

InputKeys

Left

Masked

Name

Owner

Palette

Parent

ParentWidget

ShowHint

Showing

Style

TabOrder

TabStop

Tag

Top

Visible

Width


TWidgetControl.Bitmap
 CLX Reference

TWidgetControl.Bitmap

TWidgetControl	See also

Specifies background bitmap (pixmap).

property Bitmap: TBitmap;

Description

Use Bitmap to get or set the bitmap (pixmap) used to paint the background of the control. This property is equivalent to the Bitmap property of the Palette object.


TWidgetControl.Brush
 CLX Reference

TWidgetControl.Brush

TWidgetControl	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.


TWidgetControl.ChildHandle
 CLX Reference

TWidgetControl.ChildHandle

TWidgetControl	See also

Handle used by child controls.

property ChildHandle: QWidgetH; library;

Description

ChildHandle is a read-only property that returns a reference to an underlying Qt control. This is the handle child controls should use when referring to their parent.

As implemented in TWidgetControl, ChildHandle returns the value of Handle. In descendant classes, the Handle and ChildHandle values may differ.


TWidgetControl.ClientOrigin
 CLX Reference

TWidgetControl.ClientOrigin

TWidgetControl	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.


TWidgetControl.ClientRect
 CLX Reference

TWidgetControl.ClientRect

TWidgetControl	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.


TWidgetControl.ControlCount
 CLX Reference

TWidgetControl.ControlCount

TWidgetControl	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.


TWidgetControl.Controls
 CLX Reference

TWidgetControl.Controls

TWidgetControl	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.


TWidgetControl.Enabled
 CLX Reference

TWidgetControl.Enabled

TWidgetControl	See also

Controls whether the control responds to mouse, keyboard, and timer events

property Enabled: Boolean;

Description

Enabled is re-implemented in TWidgetControl in order to connect to the corresponding features of the underlying Qt widget. TWidgetControl.Enabled is functionally identical to TControl.Enabled.


TWidgetControl.Handle
 CLX Reference

TWidgetControl.Handle

TWidgetControl	See also

Provides access to the underlying Qt widget for the control.

property Handle: QWidgetH;

Description

The Handle property returns the underlying Qt widget. In CLX, the Handle property is really a Qt object pointer; but is called a “handle” to maintain backward compatibility with VCL code. Use the Handle property to bypass the CLX API and directly access the underlying widget.

Do not refer to the Handle property during component creation or streaming. The underlying widget 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.


TWidgetControl.Hooks
 CLX Reference

TWidgetControl.Hooks

TWidgetControl

Qt event hooks for this control.

property Hooks: QWidget_hookH;

Description

Hooks contains the event hooks the underlying Qt widget uses to communicate events to the corresponding CLX control.


TWidgetControl.InputKeys
 CLX Reference

TWidgetControl.InputKeys

TWidgetControl

Specify key inputs valid with control.

property InputKeys: TInputKeys;

Description

The InputKeys property specifies the kinds of keys that are accepted as input when the control has the focus.


TWidgetControl.Masked
 CLX Reference

TWidgetControl.Masked

TWidgetControl

Enables or disables the Qt Automask feature.

property Masked: Boolean

Description

Setting Masked to true enables the Qt Automask feature. This property must be true for non-rectangular controls, which consider the non-masked control areas “transparent”. The control refrains from painting the transparent areas and passes through any mouse events over the transparent areas.


TWidgetControl.Palette
 CLX Reference

TWidgetControl.Palette

TWidgetControl

Returns palette used to draw control.

property Palette: TWidgetPalette;

Description

Palette returns the TWidgetPalette object used to draw the control. This object defines the colors available for painting and the interpretation that the control gives to symbolic color constants.


TWidgetControl.Parent
 CLX Reference

TWidgetControl.Parent

TWidgetControl	See also	Example

Indicates the parent of the control.

property Parent: TWidgetControl;

Description

TWidgetControl does additional initialization when the Parent property is assigned. The ParentWidget property is automatically set to the value of the parent’s ChildHandle property. Also, the underlying Qt widget is updated. Except for these additional initializations, Parent is identical to TControl.Parent.


TWidgetControl.ParentWidget
 CLX Reference

TWidgetControl.ParentWidget

TWidgetControl	See also

Reference to parent’s underlying control.

property ParentWidget: QWidgetH; { library }

Description

ParentWindow refers to the Qt widget that underlies the parent control. To designate a non-CLX 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

ParentWindow is set automatically when a control is created using the CreateParented method.


TWidgetControl.Showing
 CLX Reference

TWidgetControl.Showing

TWidgetControl	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.


TWidgetControl.Style
 CLX Reference

TWidgetControl.Style

TWidgetControl

Specify style object.

property Style: TWidgetStyle;

Description

Use the protected Style property to set or return the TWidgetStyle object for the control. Referencing Style automatically creates a TWidgetStyle object and assigns TWidgetControl.StyleChangedas its OnChange handler. Descendants can assign an object to the Style property, which also automatically sets the OnChange property.


TWidgetControl.TabOrder
 CLX Reference

TWidgetControl.TabOrder

TWidgetControl	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.


TWidgetControl.TabStop
 CLX Reference

TWidgetControl.TabStop

TWidgetControl	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.


 CLX Reference

TWidgetControl Events

TWidgetControl	Alphabetically	Legend

In TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp


 CLX Reference

TWidgetControl Events

TWidgetControl	By Object	Legend

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp


TWidgetControl.OnEnter
 CLX Reference

TWidgetControl.OnEnter

TWidgetControl	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.


TWidgetControl.OnExit
 CLX Reference

TWidgetControl.OnExit

TWidgetControl	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.


TWidgetControl.OnKeyDown
 CLX Reference

TWidgetControl.OnKeyDown

TWidgetControl	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.


TWidgetControl.OnKeyPress
 CLX Reference

TWidgetControl.OnKeyPress

TWidgetControl	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 OnKeyString, OnKeyDown or OnKeyUp event handlers.


TWidgetControl.OnKeyString
 CLX Reference

TWidgetControl.OnKeyString

TWidgetControl

Occurs when MBCS characters are entered.

TKeyStringEvent = procedure(Sender: TObject; var S: WideString; var Handled: Boolean) ofobject;

property OnKeyString: TKeyStringEvent ;

Description

Use the OnKeyString event handler to process MBCS input. The event handler is called once for each MBCS character. If the handler is able to process the key, it should set Handled to true, which prevents the OnKeyPress handler from being called.


TWidgetControl.OnKeyUp
 CLX Reference

TWidgetControl.OnKeyUp

TWidgetControl	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.


 CLX Reference

TWidgetControl Methods

TWidgetControl	Alphabetically	Legend

In TWidgetControl

ActionChange

AdjustClientRect

AdjustPainter

AlignControls

Broadcast

CanFocus

ChangeBounds

ChangeScale

ColorChanged

ContainsControl

ControlAtPos

ControlsListChanged

ControlsListChanging

Create

CreateHandle

CreateParented

CreateParentedControl

CreateWidget

CursorChanged

CustomAlignInsertBefore

CustomAlignPosition

DesignEventQuery

Destroy

DestroyHandle

DestroyWidget

DisableAlign

DoEnter

DoExit

EnableAlign

EnabledChanged

EventFilter

FindChildControl

FindNextControl

FixupTabList

FlipChildren

Focused

FontChanged

GetActionLinkClass

GetAlignedPaintDevice

GetChildren

GetClientOrigin

GetClientRect

GetEnabled

GetParentWidget

GetTabOrderList

HandleAllocated

HandleNeeded

HookEvents

InitWidget

InsertControl

Invalidate

InvalidateRect

InvokeHelp

KeyDown

KeyPress

KeyString

KeyUp

MaskChanged

NeedKey

NotifyControls

Painting

PaletteChanged

ReadState

Realign

RecreateWidget

RemoveControl

Repaint

ResetEvents

RestoreWidgetState

SaveWidgetState

ScaleBy

ScaleControls

ScrollBy

SelectFirst

SelectNext

SetChildOrder

SetFocus

SetInitialBounds

SetParent

SetZOrder

ShowControl

ShowHintChanged

ShowingChanged

StyleChanged

TabStopChanged

Update

UpdateControlState

UpdateWidgetShowing

ViewportRect

VisibleChanged

WantKey

WidgetFlags

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TWidgetControl Methods

TWidgetControl	By Object	Legend

ActionChange

AdjustClientRect

AdjustPainter

AfterConstruction

AlignControls

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ChangeBounds

ChangeScale

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ColorChanged

ContainsControl

ControlAtPos

ControlsListChanged

ControlsListChanging

Create

CreateHandle

CreateParented

CreateParentedControl

CreateWidget

CursorChanged

CustomAlignInsertBefore

CustomAlignPosition

DefaultHandler

DesignEventQuery

Destroy

DestroyComponents

DestroyHandle

Destroying

DestroyWidget

DisableAlign

Dispatch

DoEnter

DoExit

DragDrop

Dragging

EnableAlign

EnabledChanged

EndDrag

EventFilter

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindNextControl

FixupTabList

FlipChildren

Focused

FontChanged

Free

FreeInstance

FreeNotification

GetActionLinkClass

GetAlignedPaintDevice

GetChildren

GetClientOrigin

GetClientRect

GetEnabled

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetParentWidget

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

HookEvents

InheritsFrom

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

KeyDown

KeyPress

KeyString

KeyUp

MaskChanged

MethodAddress

MethodName

NeedKey

NewInstance

NotifyControls

Painting

PaletteChanged

ParentToClient

ReadState

Realign

RecreateWidget

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ResetEvents

RestoreWidgetState

SafeCallException

SaveWidgetState

ScaleBy

ScaleControls

ScreenToClient

ScrollBy

SelectFirst

SelectNext

SendToBack

SetBounds

SetChildOrder

SetFocus

SetInitialBounds

SetParent

SetSubComponent

SetZOrder

Show

ShowControl

ShowHintChanged

ShowingChanged

StyleChanged

TabStopChanged

Update

UpdateAction

UpdateControlState

UpdateWidgetShowing

ViewportRect

VisibleChanged

WantKey

WidgetFlags


TWidgetControl.ActionChange
 CLX Reference

TWidgetControl.ActionChange

TWidgetControl	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.


TWidgetControl.AdjustClientRect
 CLX Reference

TWidgetControl.AdjustClientRect

TWidgetControl	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 TWidgetControl, AdjustClientRect does nothing. Override this method in descendants such as TCustomTabControl where the ClientRect property is not the same as the region in which child objects can appear.


TWidgetControl.AdjustPainter
 CLX Reference

TWidgetControl.AdjustPainter

TWidgetControl	See also

Adjust area painted by QPainter object.

procedure AdjustPainter(Painter: QPainterH); virtual;

Description

TWidgetControl redefines AdjustPainter to do nothing. The adjustments made by TControl.AdjustPainter are not required for controls that are wrappers for Qt widgets.


TWidgetControl.AlignControls
 CLX Reference

TWidgetControl.AlignControls

TWidgetControl	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.


TWidgetControl.Broadcast
 CLX Reference

TWidgetControl.Broadcast

TWidgetControl	See also

Sends a message to each of the child controls.

procedure Broadcast(var Message);

Description

Broadcast sends the message to each child control in turn. This is equivalent to calling the Dispatch method for each child control.


TWidgetControl.CanFocus
 CLX Reference

TWidgetControl.CanFocus

TWidgetControl	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.


TWidgetControl.ChangeBounds
 CLX Reference

TWidgetControl.ChangeBounds

TWidgetControl	See also

Implement bounds change.

procedure ChangeBounds(ALeft, ATop, AWidth, AHeight: Integer); override;

Description

Because a TWidgetControl is a wrapper for a Qt widget, the class TWidgetControl completely redefines ChangeBounds. ChangeBounds first checks to see if the new bounds values, as modified by the Constraints property, would actually change the size or position of the control. If this is the case, ChangeBounds does the following:

Move and resize the underlying Qt widget.

Update the bounds property values.

Call BoundsChanged and RequestAlign.

Call Resize, unless the control is in the process of being loaded from a stream.


TWidgetControl.ChangeScale
 CLX Reference

TWidgetControl.ChangeScale

TWidgetControl	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.


TWidgetControl.ColorChanged
 CLX Reference

TWidgetControl.ColorChanged

TWidgetControl	See also

Notify control of color change.

procedure ColorChanged; override;

Description

As implemented in TWidgetControl, ColorChanged updates the Color properties of the control's Brush and Palette. ColorChanged also notifies all child controls that the parent color has changed.


TWidgetControl.ContainsControl
 CLX Reference

TWidgetControl.ContainsControl

TWidgetControl	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.


TWidgetControl.ControlAtPos
 CLX Reference

TWidgetControl.ControlAtPos

TWidgetControl	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 TWdgetControl 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.


TWidgetControl.Create
 CLX Reference

TWidgetControl.Create

TWidgetControl	See also

Creates an instance of TWidgetControl.

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.


TWidgetControl.ControlsListChanged
 CLX Reference

TWidgetControl.ControlsListChanged

TWidgetControl	See also

Responds after child controls are added or removed.

procedure ControlsListChanged(Control: TControl; Inserting: Boolean); dynamic;

Description

The protected ControlsListChanged method is called automatically after the Controls property changes. Control is the child control that was added or removed. Inserting is True if Control was added, False if it was removed.

As implemented in TWidgetControl, ControlsListChanged does nothing. Descendent classes override ControlsListChanged in order to manage their child controls.


TWidgetControl.ControlsListChanging
 CLX Reference

TWidgetControl.ControlsListChanging

TWidgetControl 	See also

Respond when child controls are about to be added or removed.

procedure ControlsListChanging(Control: TControl; Inserting: Boolean); dynamic;

Description

The protected ControlsListChanging method is called automatically when the Controls property is about to change. Control is the child control to be added or removed. Inserting is True if Control is to be added, False if it is to be removed.

As implemented in TWidgetControl, ControlsListChanging does nothing. Descendent classes override ControlsListChanging in order to manage their child controls.


TWidgetControl.CreateHandle
 CLX Reference

TWidgetControl.CreateHandle

TWidgetControl	See also

Creates underlying screen object.

procedure CreateHandle; virtual;

Description

CreateHandle creates the Qt widget that underlies the control. if it does not already exist. The new object pointer 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.


TWidgetControl.CreateParented
 CLX Reference

TWidgetControl.CreateParented

TWidgetControl	See also

Creates and initializes a control as the child of a specified non-CLX container.

constructor CreateParented(ParentWindow: HWnd);

Description

Call CreateParented to embed a new control in a non-CLX parent window.


TWidgetControl.CreateParentedControl
 CLX Reference

TWidgetControl.CreateParentedControl

TWidgetControl	See also

Creates and initializes a control as the child of a specified non-CLX window.

classfunction CreateParentedControl(ParentWidget: QWidgetH): TWidgetControl;

Description

Call CreateParentedControl to embed a new control in a non-CLX parent.

CreateParentedControl allocates memory for a new instance of the same class as the windowed control, sets its ParentWidget property to ParentWidget, 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.


TWidgetControl.CreateWidget
 CLX Reference

TWidgetControl.CreateWidget

TWidgetControl	See also

Creates the underlying widget.

procedure CreateWidget; virtual;

Description

CreateWidget 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 CreateWidget to pass additional initialization messages to the screen object when it is created.


TWidgetControl.CursorChanged
 CLX Reference

TWidgetControl.CursorChanged

TWidgetControl

Responds when the cursor changes.

procedure CursorChanged; override;

Description

CursorChanged is called automatically when the Cursor property changes. As implemented in TWidgetControl, CursorChanged uses the Cursor property to set the cursor of the underlying Qt widget.


TWidgetControl.CustomAlignInsertBefore
 CLX Reference

TWidgetControl.CustomAlignInsertBefore

TWidgetControl	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 TWidgetControl, CustomAlignInsertBefore always returns false, so the controls are placed in the order they appear in the Controls property.


TWidgetControl.CustomAlignPosition
 CLX Reference

TWidgetControl.CustomAlignPosition

TWidgetControl

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 TWidgetControl, CustomAlignPosition does nothing.


TWidgetControl.DesignEventQuery
 CLX Reference

TWidgetControl.DesignEventQuery

TWidgetControl

Filter design-time events.

function DesignEventQuery(Sender: QObjectH; Event: QEventH): Boolean; dynamic;

Description

DesignEventQuery is called automatically when the underlying Qt widget receives an input event in design mode. DesignEventQuery responds True  if the control should respond to the event.

As implemented in TWidgetControl, DesignEventQuery always returns False. Descendent classes can overrides this behavior to implement features that are active at design time.


TWidgetControl.DestroyWidget
 CLX Reference

TWidgetControl.Destroy

TWidgetControl	See also

Destroys an instance of TWidgetControl.

destructor Destroy; override;

Description

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


TWidgetControl.DestroyHandle
 CLX Reference

TWidgetControl.DestroyHandle

TWidgetControl	See also

Destroys the control's widget without destroying the control.

procedure DestroyHandle;

Description

Call DestroyHandle to dispose of the widget, 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 CreateWidget and DestroyWidget, whenever possible.

If the control has TWidgetControl objects as child controls, DestroyHandle calls each of their DestroyHandle methods before calling DestroyWnd to destroy its own handle.


TWidgetControl.DestroyWidget
 CLX Reference

TWidgetControl.DestroyWidget

TWidgetControl

Destroys the control's window.

procedure DestroyWnd; virtual;

Description

DestroyWidget 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 CreateWidget method.

Before the window is destroyed, DestroyWidget saves a copy of the control's text in memoryand frees any device contexts.  When the window is recreated, the stored copy of the control’s text is assigned to the new window.


TWidgetControl.DisableAlign
 CLX Reference

TWidgetControl.DisableAlign

TWidgetControl	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. Once the counter returns to zero, realignment is enabled.


TWidgetControl.DoEnter
 CLX Reference

TWidgetControl.DoEnter

TWidgetControl	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 TWidgetControl, DoEnter calls the OnEnter event handler, if defined.

Descendent classes that override DoEnter should always call the inherited method.


TWidgetControl.DoExit
 CLX Reference

TWidgetControl.DoExit

TWidgetControl	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 TWidgetControl, DoExit calls the OnExit event handler, if defined.

Descendent classes that override DoExit should always call the inherited method.


TWidgetControl.EnableAlign
 CLX Reference

TWidgetControl.EnableAlign

TWidgetControl	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.


TWidgetControl.EnabledChanged
 CLX Reference

TWidgetControl.EnabledChanged

TWidgetControl

Respond to change in Enabled property.

procedure EnabledChanged; override;

Description

EnabledChanged is called automatically when the Enabled property changes.

As implemented in TWidgetControl, EnabledChanged sets the Enabled property of the underlying Qt control to match the CLX property, if necessary, It then calls the inherited method.


TWidgetControl.EventFilter
 CLX Reference

TWidgetControl.EventFilter

TWidgetControl

Respond to Qt events.

function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; virtual;

Description

EventFilter is called automatically when a Qt mouse or keyboard event needs to be handled by a CLX control.

As implemented in TWidgetControl, EventFilter responds to event notifications by performing the default response. Typically, this involves dispatching the event to the appropriate virtual method (such as the Click method, which generates an OnClick event).

Important:	When overriding the EventFilter method, be sure to call the inherited method so that the default event processing can occur.


TWidgetControl.FindChildControl
 CLX Reference

TWidgetControl.FindChildControl

TWidgetControl	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.


TWidgetControl.FindNextControl
 CLX Reference

TWidgetControl.FindNextControl

TWidgetControl	See also

Returns the control's next child in the tab order after the specified control.

function FindNextControl(CurControl: TWidgetControl; GoForward, CheckTabStop, CheckParent: Boolean): TWidgetControl;

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.


TWidgetControl.FixupTabList
 CLX Reference

TWidgetControl.FixupTabList

TWidgetControl	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.


TWidgetControl.FlipChildren
 CLX Reference

TWidgetControl.FlipChildren

TWidgetControl

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.


TWidgetControl.Focused
 CLX Reference

TWidgetControl.Focused

TWidgetControl	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.


TWidgetControl.FontChanged
 CLX Reference

TWidgetControl.FontChanged

TWidgetControl

Responds to changes in the Font property.

procedure FontChanged; override;

Description

FontChanged is called automatically when the Font property changes.

As implemented in TWidgetControl, FontChanged sets the Font property of the underlying Qt control to match the CLX property. If the control has a parent, FontChanged notifies the parent.


TWidgetControl.GetActionLinkClass
 CLX Reference

TWidgetControl.GetActionLinkClass

TWidgetControl	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 TWidgetControl, GetActionLinkClass returns the TWidgetControlActionLink class type, which associates the HelpContext, ShowHint, Caption, Enabled and Visible properties and the OnClick event handler. Descendants of TWidgetControl override this method to specify a descendant of TControlActionLink that handles their configuration of properties and events.


TWidgetControl.GetAlignedPaintDevice
 CLX Reference

TWidgetControl.GetAlignedPaintDevice

TWidgetControl	See also

Returns paint device for aligned control.

function GetAlignedPaintDevice: QPaintDeviceH; virtual;

Description

GetAlignedPaintDevice is called automatically when a Qt paint device is required for the control and the Align property is not alNone. As implemented in TWidgetControl, GetAlignedPaintDevice returns the paint device for the widget indicated by ChildHandle.


TWidgetControl.GetChildren
 CLX Reference

TWidgetControl.GetChildren

TWidgetControl	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.


TWidgetControl.GetClientOrigin
 CLX Reference

TWidgetControl.GetClientOrigin

TWidgetControl	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.


TWidgetControl.GetClientRect
 CLX Reference

TWidgetControl.GetClientRect

TWidgetControl	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.


TWidgetControl.GetEnabled
 CLX Reference

TWidgetControl.GetEnabled

TWidgetControl	See also

Returns the value of the Enabled property.

function GetEnabled: Boolean; virtual;

Description

GetEnabled is the read implementation of the Enabled property. As implemented in TWidgetControl, GetEnabled retrieves the enabled state of the underlying Qt widget.


TWidgetControl.GetParentWidget
 CLX Reference

TWidgetControl.GetParentWidget

TWidgetControl	See also

Returns a widget handle for the parent of the control.

function GetParentWidget : QWidgetH; virtual;

Description

GetParentWidget is the protected access function for the ParentWidget property. It returns the handle for the widget that acts as a parent to the control.


TWidgetControl.GetTabOrderList
 CLX Reference

TWidgetControl.GetTabOrderList

TWidgetControl	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.


TWidgetControl.HandleAllocated
 CLX Reference

TWidgetControl.HandleAllocated

TWidgetControl	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 widget has been generated.

If the widget exists, HandleAllocated returns True. If the widget 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.


TWidgetControl.HandleNeeded
 CLX Reference

TWidgetControl.HandleNeeded

TWidgetControl	See also

Creates a widget for the control if it doesn't already exist.

procedure HandleNeeded;

Description

Call HandleNeeded to create a widget for the control.

If the widget does not exist, HandleNeeded calls the CreateHandle method for the parent of the control before it creates a widget for this control.


TWidgetControl.HookEvents
 CLX Reference

TWidgetControl.HookEvents

TWidgetControl

Create Qt widget event hooks.

procedure HookEvents; virtual;

Description

HookEvents is called automatically when the underlying Qt widget is created or recreated. HookEvents creates the event hook objects used by a CLX control to access Qt-generated events. Descendants that override this method must always call the inherited method.


TWidgetControl.InitWidget
 CLX Reference

TWidgetControl.InitWidget

TWidgetControl

Initializes the underlying Qt widget

procedure InitWidget; virtual;

Description

InitWidget initializes values related to the underlying Qt control, including the Qt properties themselves. InitWidget is called automatically after the Handle and Parent properties are initialized.

As implemented in TWidgetControl, InitWidget adjusts the size of the underlying Qt control, and enables mouse, drop, focus, and keyboard events. It also sets the Masked and Color properties to their default values and does the same for the Color property of the Brush object.


TWidgetControl.InsertControl
 CLX Reference

TWidgetControl.InsertControl

TWidgetControl	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.


TWidgetControl.Invalidate
 CLX Reference

TWidgetControl.Invalidate

TWidgetControl	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.


TWidgetControl.InvalidateRect
 CLX Reference

TWidgetControl.InvalidateRect

TWidgetControl	See also

Sechedule partial control repaint

procedure InvalidateRect(const Rect: TRect; EraseBackground: Boolean);

Description

Invalidate informs a control that part of its surface needs to be repainted. Rect specifies the invalid control area. EraseBackground should be set to True if the control background must be erased before it is repainted. For more information, see Invalidate.


TWidgetControl.InvokeHelp
 CLX Reference

TWidgetControl.InvokeHelp

TWidgetControl	See also

Display context-sensitive help.

procedure InvokeHelp; virtual;

Description

InvokeHelp is called automatically when the user presses the application help key (normally F1) while the control has the focus. If a help topic is defined for this control (using HelpContext or HelpKeyword, depending on the value of HelpType), then InvokeHelp uses Application.KeywordHelp or Application.ContextHelp to display that topic. If no help topic is defined, then InvokeHelp attempts to call InvokeHelp for its parent. Thus a container control can specify a default help topic for its children.


TWidgetControl.KeyDown
 CLX Reference

TWidgetControl.KeyDown

TWidgetControl	See also

Respond to key press events.

procedure KeyDown(var Key: Word; Shift: TShiftState); dynamic;

Description

KeyDown is called automatically when any key on the keyboard is pressed. If autorepeat is enabled and a non-modifier key is held down, KeyDown is called repeatedly until the key is released. The values passed to KeyDown are:

Key	The Qt key code for the key pressed. See Key Codes. If KeyDown changes this value to 0, subsequent processing of the key is suppressed.

Shift	The set of modifier keys currently pressed. See TShiftState. Note that pressing a modifier key generates a KeyDown event for the key itself, then modifies the TShiftState value for subsequent  KeyDown events.

As defined in TWidgetControl, KeyDown simply invokes the OnKeyDown event handler, if it exists. The event handler can also abort further processing by modifying the Key parameter. Descendants can modify or replace this behavior of KeyDown.

To process keyboard input as characters instead of keystrokes, use KeyPress instead of KeyDown.


TWidgetControl.KeyPress
 CLX Reference

TWidgetControl.KeyPress

TWidgetControl	See also

Respond to keyboard input.

procedure KeyPress(var Key: Char); dynamic;

Description

KeyPress is called automatically when any character key is pressed. The value passed to KeyPress is a character code automatically modified by Shift and Ctrl key chords and “dead key” usage. If autorepeat is enabled, KeyPress is called repeatedly until the key is released. If KeyPress changes its parameter to 0, subsequent processing of the key is suppressed.

As defined in TWidgetControl, KeyPress simply invokes the OnKeyPress event handler, if it exists. The event handler can also abort further processing by modifying the Key parameter. Descendants can modify or replace this behavior of KeyPress.

KeyPress only handles simple character input. To handle function or modifier key input, or to handle individual key presses, use KeyDown.


TWidgetControl.KeyString
 CLX Reference

TWidgetControl.KeyString

TWidgetControl

Generate events for MBCS input.

procedure KeyString(var S: WideString; varHandled: Boolean); dynamic;

Description

KeyString is called automatically when an MBCS character is input. As implemented in TWidgetControl, KeyString calls the OnKeyString event handler. Descendent classes can modify this behavior.


TWidgetControl.KeyUp
 CLX Reference

TWidgetControl.KeyUp

TWidgetControl	See also

Respond to released key.

procedure KeyUp(var Key: Word; Shift: TShiftState); dynamic;

Description

KeyUp is called automatically when any key on the keyboard is released. If autorepeat is enabled and a non-modifier key is held down, KeyUp is called repeatedly until the key is released. The values passed to KeyUp are:

Key	The Qt key code for the key released. See Key Codes. If KeyUp changes this value to 0, subsequent processing of the key is suppressed.

Shift	The set of modifier keys currently pressed. See TShiftState. Note that releasing a modifier key generates a KeyUp event for the key itself.

As defined in TWidgetControl, KeyUp simply invokes the OnKeyUp event handler, if it exists. The event handler can also abort further processing by modifying the Key parameter. Descendant classes can modify or replace this behavior of KeyUp.


TWidgetControl.MaskChanged
 CLX Reference

TWidgetControl.MaskChanged

TWidgetControl	See also

Respond to change of Masked property.

procedure MaskChanged; dynamic;

Description

MaskChanged is called automatically whenever the Masked property changes. As implemented in TWidgetControl, MaskChanged sets the corresponding value of the underlying Qt control, if necessary.


TWidgetControl.NeedKey
 CLX Reference

TWidgetControl.NeedKey

TWidgetControl

Evaluate input key.

function NeedKey(Key: Integer; Shift: TShiftState; KeyText: string): Boolean; dynamic;

Description

NeedKey is called automatically for each keystroke when the control has the focus. NeedKey returns true if the control needs to provide final handling logic for the keyboard event. NeedKey provides a place to implement event handling logic, and to prevent a key from being handled elsewhere. If NeedKey returns false, then the control looks for a menu key accelerator that corresponds to the key event. If no such accelerator exists, the control calls WantKey for the parent form, which begins the search for a control that implements a WantKey handler.

WantKey takes the following parameters:

Key is the key code for the key pressed..

Shift indicates whether the Shift, Alt, and/or Control keys were used as modifier keys.

KeyText is the character value of the user input.

As implemented in TWidgetControl, NeedKey returns true if the control is used in design mode, or if the key is allowed by the current value of InputKeys. All further handling is left to the underlying Qt widget. Descedant classes should call the inherited method before modifying this behavior.


TWidgetControl.NotifyControls
 CLX Reference

TWidgetControl.NotifyControls

TWidgetControl	See also

Sends a message to all the child controls.

procedure NotifyControls(Msg: Word);

Description

NotifyControls uses Broadcast to send a message to all children of the control.


TWidgetControl.Painting
 CLX Reference

TWidgetControl.Painting

TWidgetControl

Generates a Qt Paint Event.

procedure Painting(Sender: QObjectH; EventRegion: QRegionH); virtual;

Description

Painting is called automatically when a Qt paint event needs to be generated.


TWidgetControl.PaletteChanged
 CLX Reference

TWidgetControl.PaletteChanged

TWidgetControlSee also

Responds to changes in the palette that this widget uses.

procedure PaletteChanged(Sender: TObject); dynamic;

Description

PaletteChanged is the default event handler for the Palette objects OnChanged event. As implemented in TWidgetControl, PaletteChanged performs the necessary notification for the underlying Qt widget.

Sender is the palette object that the widget uses to define the available colors and to interpret symbolic color constants.


TWidgetControl.ReadState
 CLX Reference

TWidgetControl.ReadState

TWidgetControl	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 TWidgetControl, 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.


TWidgetControl.Realign
 CLX Reference

TWidgetControl.Realign

TWidgetControl	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.


TWidgetControl.RecreateWidget
 CLX Reference

TWidgetControl.RecreateWidget

TWidgetControl	See also

Recreate underlying Qt widget.

procedure RecreateWidget;

Description

Call RecreateWidget to recreate the control from scratch. RecreateWidget destroys the underlying Qt widget and creates a new widget according to the current property settings. Some changes in control properties are not implemented until this re-creation occurs.


TWidgetControl.RemoveControl
 CLX Reference

TWidgetControl.RemoveControl

TWidgetControl	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.


TWidgetControl.Repaint
 CLX Reference

TWidgetControl.Repaint

TWidgetControl	See also

Repaints the entire control.

procedure Repaint; override;

Description

Call Repaint to repaint the control.

As implemented in TWidgetControl, Repaint calls the Invalidate method and then the Update method to repaint the control.


TWidgetControl.ResetEvents
 CLX Reference

TWidgetControl.ResetEvents

TWidgetControl

Initialize event handling.

procedure ResetEvents; virtual;

Description

ResetEvents is called automatically when the underlying Qt widget is created or recreated. ResetEvents performs initialization required to ensure that CLX-based event handlers will function.


TWidgetControl.::RestoreWidgetState
 CLX Reference

TWidgetControl.RestoreWidgetState

TWidgetControl

Restore state information to underlying Qt widget.

procedure RestoreWidgetState; virtual;

Description

RestoreWidgetState is called automatically when the underlying Qt widget is created or re-created, in order to configure the underlying Qt widget. If the widget is being re-created (by ReCreateWidget), RestoreWidgetState uses control state information previously recorded by SaveWidgetState.

As implemented in TWidgetControl, RestoreWidgetState does nothing. Descendants that record some state information by configuring the underlying widget should redefine SaveWidgetState and RestoreWidgetState.


TWidgetControl.::SaveWidgetState
 CLX Reference

TWidgetControl.SaveWidgetState

TWidgetControl

Save state information from underlying Qt widget.

procedure SaveWidgetState; virtual;

Description

SaveWidgetState is called automatically when the underlying Qt widget is destroyed prior to being re-created. This allows the control to record any state information that is stored solely in the widget’s configuration. This state information is later restored by RestoreWidgetState.

As implemented in TWidgetControl, SaveWidgetState does nothing. Descendant classes that record some state information by configuring the underlying widget should redefine SaveWidgetState and RestoreWidgetState.


TWidgetControl.ScaleBy
 CLX Reference

TWidgetControl.ScaleBy

TWidgetControl	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.


TWidgetControl.ScaleControls
 CLX Reference

TWidgetControl.ScaleControls

TWidgetControl	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.


TWidgetControl.ScrollBy
 CLX Reference

TWidgetControl.ScrollBy

TWidgetControl	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 TWidgetControl, it makes the most sense to use it for descendants of TScrollingWidget.

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.


TWidgetControl.SelectFirst
 CLX Reference

TWidgetControl.SelectFirst

TWidgetControl	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.


TWidgetControl.SelectNext
 CLX Reference

TWidgetControl.SelectNext

TWidgetControl	See also

Moves the input focus from the current child control to the next one in the tab order.

procedure SelectNext(CurControl: TWidgetControl; 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.


TWidgetControl.SetChildOrder
 CLX Reference

TWidgetControl.SetChildOrder

TWidgetControl	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.


TWidgetControl.SetFocus
 CLX Reference

TWidgetControl.SetFocus

TWidgetControl	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.


TWidgetControl.SetInitialBounds
 CLX Reference

TWidgetControl.SetInitialBounds

TWidgetControl

Set Initial Bounds of underlying Qt widget.

procedure SetInitialBounds; virtual;

Description

SetInitialBounds is called automatically when the underlying Qt widget is created or re-created. SetInitialBounds sets the initial bounds of the widget.

As implemented in TWidgetControl, SetInitialBounds uses the Left, Top, Width, and Height properties to set the widget bounds. Descendant classes can modify this behavior.


TWidgetControl.SetParent
 CLX Reference

TWidgetControl.SetParent

TWidgetControl	See also

Sets the parent of the control.

procedure SetParent(AParent: TWidgetControl); override;

Description

SetParent is the protected implementation of the Parent property. This method is overridden in TWidgetControl in order to coordinate the corresponding property in the underly Qt widget.


TWidgetControl.SetZOrder
 CLX Reference

TWidgetControl.SetZOrder

TWidgetControl	See also

Moves the control to the top or bottom of the parent control’s (or screen’s) list of TWidgetControl 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.

TWidgetControl 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.


TWidgetControl.ShowControl
 CLX Reference

TWidgetControl.ShowControl

TWidgetControl	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 TWidgetControl, 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.


TWidgetControl.ShowHintChanged
 CLX Reference

TWidgetControl.ShowHintChanged

TWidgetControl	See also

Notify control that ShowHint has changed.

procedure ShowHintChanged; dynamic;

Description

ShowHintChanged is called automatically when the ShowHint property changes.

As implemented in TWidgetControl, ShowHintChanged uses NotifyControls to notify its children of the event. As a result, the ShowHintChanged method being called for each child. Descendant classes can redefine ShowHintChanged to add additional responses to this event.


TWidgetControl.ShowingChanged
 CLX Reference

TWidgetControl.ShowingChanged

TWidgetControl

Respond to change in Showing property.

procedure ShowingChanged; dynamic;

Description

ShowingChanged is called automatically when the value of the Showing property changes.

As implemented in TWidgetControl, ShowingChanged calls UpdateWidgetShowing, provided the underlying Qt widget has been created. Descendant classes can extend this behavior.


TWidgetControl.StyleChanged
 CLX Reference

TWidgetControl.StyleChanged

TWidgetControl

Respond to change in Style property.

procedure StyleChanged(Sender: TObject); dynamic;

Description

StyleChanged is called automatically when the value of the Style property changes. StyleChanged also automatically becomes the OnChange event handler for a TWidgetStyle object assigned to the Style property, and for the TWidgetStyle object that is created automatically if the Style property is read without being initialized.

As implemented in TWidgetControl, StyleChanged applies the new Style to the underlying Qt widget. Descendant classes can extend this behavior.


TWidgetControl.TabstopChanged
 CLX Reference

TWidgetControl.TabStopChanged

TWidgetControl

Respond to change in TabStop property.

procedure TabStopChanged; dynamic;

Description

TabStopChanged is called automatically when the value of the TabStop property changes.

As implemented in TWidgetControl, TabStopChanged does nothing. Descendant classes can extend this behavior.


TWidgetControl.Update
 CLX Reference

TWidgetControl.Update

TWidgetControl	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.


TWidgetControl.UpdateControlState
 CLX Reference

TWidgetControl.UpdateControlState

TWidgetControl	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 TWidgetControl, 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.


TWidgetControl.UpdateWidgetShowing
 CLX Reference

TWidgetControl.UpdateWidgetShowing

TWidgetControl

Update Showing property.

procedure UpdateWidgetShowing; dynamic;

Description

UpdateWidgetShowing is called automatically when a change occurs that might affect the Showing property.

As implemented in TWidgetControl, UpdateWidgetShowing changes the visibility of the underlying Qt widget to match the value of the Showing property. Descendant classes can extend this behavior.


TWidgetControl.ViewportRect
 CLX Reference

TWidgetControl.ViewportRect

TWidgetControl

Return control’s viewport rectangle

function ViewportRect: TRect; virtual;

Description

ViewportRect returns the viewport rectangle for the control.

As implemented in TWidgetControl, ViewportRect returns the value of the ClientRect property.


TWidgetControl.VisibleChanged
 CLX Reference

TWidgetControl.VisibleChanged

TWidgetControl

Respond to changes in Visible..

procedure VisibleChanged; override;

Description

VisibleChanged iscalled automatically when the Visible property changes.

As implemented in TWidgetControl, VisibleChanged makes sure that the control does not have the focus unless Visible is true. It then calls UpdateControlState.


TWidgetControl.WantKey
 CLX Reference

TWidgetControl.WantKey

TWidgetControl	See also

Handle non-focus keystrokes.

function WantKey(Key: Integer; Shift: TShiftState; KeyText: string): Boolean; dynamic;

Description

WantKey is called automatically for keystrokes that were not handled by NeedKey or by menu accelerator handlers. WantKey returns true if the control desires, but does not need, to provide final handling logic for the keyboard event. See TControl.WantKey for more information.

As implemented in TWidgetControl, WantKey calls the WantKey method of each of control in Controls. If any of these nested calls returns true, WantKey returns true and exits, possibly without calling all the child controls. If none of these nested calls returns true, WantKey returns false.


TWidgetControl.WidgetFlags
 CLX Reference

TWidgetControl.WidgetFlags

TWidgetControl

Determine Qt widget flags.

function WidgetFlags: Integer; virtual;

Description

WidgetFlags is called automatically when CLX needs to determine what widget flags should be set in the underlying Qt widget. As implemented in TWidgetControl, WidgetFlags returns 0, which means that no widget flags are set. See the Qt documentation for more information.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl


TWindowAction
 CLX Reference

TWindowAction

Hierarchy	Properties	Methods	Events	Using TWindowAction	See also

TWindowAction is the base class for action objects that work with MDI forms.

Unit

QStdActns

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, or TWindowTile.

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.


 CLX Reference

TWindowAction properties

TWindowAction	Alphabetically	Legend

In TWindowAction

Form

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TWindowAction properties

TWindowAction	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

Form

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


TWindowAction.Form
 CLX 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.


 CLX Reference

TWindowAction events

TWindowAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TWindowAction events

TWindowAction	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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


TWindowMinimizeAll
 CLX Reference

TWindowMinimizeAll

Hierarchy	Properties	Methods	Events	Using TWindowMinimizeAll	See also

TWindowMinimizeAll minimizes all MDI child forms.

Unit

QStdActns

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.


 CLX Reference

TWindowMinimizeAll properties

TWindowMinimizeAll	Alphabetically	Legend

Derived from TWindowAction

Form

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TWindowMinimizeAll properties

TWindowMinimizeAll	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

Form

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TWindowMinimizeAll events

TWindowMinimizeAll	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TWindowMinimizeAll events

TWindowMinimizeAll	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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


TWindowTile
 CLX Reference

TWindowTile

Hierarchy	Properties	Methods	Events	Using TWindowTile	See also

TWindowTile arranges MDI child forms so that they are all the same size.

Unit

QStdActns

Description

Add TWindowTile to an action list to allow users to tile the MDI child forms. Controls such as menu items and tool buttons linked to this action cause the MDI parent form to tile its children.

TWindowTile 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.


 CLX Reference

TWindowTile properties

TWindowTile	Alphabetically	Legend

Derived from TWindowAction

Form

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TWindowTile properties

TWindowTile	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

Form

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TWindowTile events

TWindowTile	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TWindowTile events

TWindowTile	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX Reference

TWindowTile methods

TWindowTile	Alphabetically	Legend

In TWindowTile

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

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


 CLX Reference

TWindowTile methods

TWindowTile	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

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


TWindowTile.ExecuteTarget
 CLX Reference

TWindowTile.ExecuteTarget

TWindowTile	See also

Tiles the 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 calls the form’s Tile method so that it tile’s its MDI children.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TWindowAction

TWindowTile


TWidgetPalette
 CLX Reference

TWidgetPalette

Hierarchy	Properties	Methods	Events	See also

TWidgetPalette encapsulates the palette information for a control.

Unit

QGraphics

Description

A TWidgetPalette encapsulates palette operations for a TWidgetControl object. It determines the colors and brush used to paint the various parts of the control.


 CLX Reference

TWidgetPalette Properties

TWidgetPalette	By Object	Legend

In TWidgetPalette

Bitmap

Color

ColorRole

TextColor

TextColorRole

Derived from TPalette

BaseColor

Handle

Owned


 CLX Reference

TWidgetPalette Properties

TWidgetPalette	By Object	Legend

BaseColor

Bitmap

Color

ColorRole

Handle

Owned

TextColor

TextColorRoleTWidgetPalette_TextColorRole>main


TWidgetPalette.Bitmap
 CLX Reference

TWidgetPalette.Bitmap

TWidgetPalette	See also

Specifies the bitmap that is used for all brushes that use this palette.

property Bitmap: TBitmap;

Description

Set Bitmap to specify the brush bitmap to use when painting controls that use this palette. When setting Bitmap, the resulting bitmap is used for all color groups (states) of the current ColorRole.

Read Bitmap to obtain the bitmap to use on a brush when painting on the widget those parts that reflect ColorRole.


TWidgetPalette.Color
 CLX Reference

TWidgetPalette.Color

TWidgetPalette	See also

Determines the color used by this palette in drawing operations that involve the current color role.

property Color: TColor;

Description

Read Color to obtain a TColor value that reflects the role specified by ColorRole. Set Color to specify the color for that role (in all color groups, or states, of the control).


TWidgetPalette.ColorRole
 CLX Reference

TWidgetPalette.ColorRole

TWidgetPalette	See also

Determines the color role currently in use.

property ColorRole: TColorRole;

Description

Each palette can contain several colors, each of which reflects a role. The role reflects what part of the control is currently being painted. When you change ColorRole, the palette changes the values of the Color and Bitmap properties to reflect the specified role.

ColorRole is the role that indicates a background color or shading effect. For foreground colors, use the TextColorRole property instead.


TWidgetPalette.TextColor
 CLX Reference

TWidgetPalette.TextColor

TWidgetPalette	See also

Determines the color used by this palette in drawing operations that involve the current text color role.

property TextColor: TColor;

Description

Read TextColor to obtain a TColor value that reflects the role specified by TextColorRole. Set TextColor to specify the color for that role (in all color groups, or states, of the control).


TWidgetPalette.TextColorRole
 CLX Reference

TWidgetPalette.TextColorRole

TWidgetPalette	See also

Determines the text color role currently in use.

property TextColorRole: TColorRole;

Description

Each palette can contain several colors, each of which reflects a role. The role reflects what part of the control is currently being painted. When you change TextColorRole, the palette changes the value of the TextColor property to reflect the specified role.

TextColorRole is the role that indicates a foreground color. For background colors, use the ColorRole property instead.


 CLX Reference

TWidgetPalette Events

TWidgetPalette	By Object	Legend

Derived from TPalette

OnChange


 CLX Reference

TWidgetPalette Events

TWidgetPalette	By Object	Legend

OnChange


 CLX Reference

TWidgetPalette Methods

TWidgetPalette	By Object	Legend

In TWidgetPalette

Create

Destroy

IsBitmapEmpty

Derived from TPalette

BeginUpdate

ColorGroup

EndUpdate

GetBrushPixmap

GetColor

SetBitmap

SetColor

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


 CLX Reference

TWidgetPalette Methods

TWidgetPalette	By Object	Legend

AfterConstruction

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ColorGroup

Create

DefaultHandler

Destroy

Dispatch

EndUpdate

FieldAddress

Free

FreeInstance

GetBrushPixmap

GetColor

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

IsBitmapEmpty

MethodAddress

MethodName

NewInstance

SafeCallException

SetBitmap

SetColor


TWidgetPalette.Create
 CLX Reference

TWidgetPalette.Create

TWidgetPalette	See also

Creates an instance of TWidgetPalette.

constructor Create; virtual;

Description

Do not create instances of TWidgetPalette in an application. Each TWidgetControl object has its own, internal TWidgetPalette instance, which it uses for painting.

Each TWidgetPalette instance is originally created as an unowned palette, sharing the same QPalette instance as the application palette. When you change the palette using the TWidgetPalette properties and methods, however, TWidgetPalette creates its own QPalette object to represent the unique configuration of this palette.


TWidgetPalette.Destroy
 CLX Reference

TWidgetPalette.Destroy

TWidgetPalette	See also

Destroys an instance of TWidgetPalette.

destructor Destroy; override;

Description

Do not free TWidgetPalette instances. Each TWidgetControl object has its own, internal TWidgetPalette instance, which it frees from its destructor.


TWidgetPalette.IsBitmapEmpty
 CLX Reference

TWidgetPalette.IsBitmapEmpty

TWidgetPalette	See also

Indicates whether the bitmap specified by the Bitmap property is empty.

function IsBitmapEmpty: Boolean;

Description

Use IsBitmapEmpty to determine whether a non-empty bitmap has been assigned. IsBitmapEmpty returns True if the Bitmap property has not been assigned, if the Bitmap property has been set to a bitmap with an empty image, or if the Bitmap has no corresponding pixmap.


Hierarchy

TObject

TPalette

TWidgetPalette


TWriter
 CLX 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.


 CLX Reference

TWriter properties

TWriter	Alphabetically	Legend

In TWriter

Position

RootAncestor

UseQualifiedNames

Derived from TFiler

Ancestor

IgnoreChildren

LookupRoot

Root


 CLX Reference

TWriter properties

TWriter	By object	Legend

Ancestor

IgnoreChildren

LookupRoot

Position

Root

RootAncestor

UseQualifiedNames


TWriter.Position
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TWriter events

TWriter	Alphabetically	Legend

In TWriter

OnFindAncestor


 CLX Reference

TWriter events

TWriter	By object	Legend

OnFindAncestor


TWriter.OnFindAncestor
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TWriter.WriteRootComponent

TWriter	See also

Calls the WriteDescendent method.

procedure WriteRootComponent(Root: TComponent);

Description

WriteRootComponent is provided for backward compatibility only.


TWriter.WriteSignature
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TPrinter
 CLX Reference

TPrinter

Hierarchy	Properties	Methods	Using TPrinter	See also

TPrinter encapsulates the QT printer interface. TPrinter acts in much the same ways as the previous versions. However, in the current version, printing is done via a PrintAdapter. By default, TPrinter creates a TQPrintAdapter which is a wrapper around the QT printer. Descendant classes should inherit from TPrintAdapter and implement the abstract methods.

Unit

QPrinters

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.

A print job is started by a call to BeginDoc. The application sends commands by rendering through the PrintAdapter object. 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.


 CLX Reference

TPrinter properties

TPrinter	Alphabetically	Legend

In TPrinter

Aborted

Canvas

Copies

Handle

Margins

Orientation

OutputDevice

OutputType

PageHeight

PageNumber

PageWidth

PrintAdapter

Printers

Printing

Title

XDPI

YDPI


 CLX Reference

TPrinter properties

TPrinter	By object	Legend

Aborted

Canvas

Copies

Handle

Margins

Orientation

OutputDevice

OutputType

PageHeight

PageNumber

PageWidth

PrintAdapter

Printers

Printing

Title

XDPI

YDPI


TPrinter.Aborted
 CLX 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
 CLX 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.Copies
 CLX 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.Handle
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.Printers
 CLX Reference

TPrinter.Printers

TPrinter	See also

Lists all printers installed.

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
 CLX 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
 CLX 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 in the Print Manager and for network title pages.


TPrinter.PrintAdapter
 CLX Reference

TPrinter.PrintAdapter

TPrinter

Determines the PrintAdapter to use when printing.

property PrintAdapter: TPrintAdapter;

Description

When creating an instance of TPrinter you can use the default PrintAdapter or create one. If you do not explicitly create a PrintAdapter, TPrinter will create a TQPrintAdapter that acts as an interface to the QT printer object. The PrintAdapterOwned property will be set to True. A PrintAdapter is used to direct the output of the printer.


TPrinter.Margins
 CLX Reference

TPrinter.Margins

TPrinter

Returns the width of the left/right and top/bottom margins of the printer.

property Margins: TSize;

Description

The margins can be changed by choosing the paper size and orientation.


TPrinter.XDPI
 CLX Reference

TPrinter.XDPI

TPrinter

Returns the number of horizontal pixels per inch defined by the printer.

property XDPI: Integer;

Description

Use this property to return the horizontal pixel definition of the printer.


TPrinter.YDPI
 CLX Reference

TPrinter.YDPI

TPrinter

Returns the number of vertical pixels per inch defined by the printer.

property YDPI: Integer;

Description

Use this property to return the vertical pixel definition of the printer.


 CLX Reference

TPrinter methods

TPrinter	Alphabetically	Legend

In TPrinter

Abort

BeginDoc

Create

Destroy

EndDoc

ExecuteSetup

NewPage

SetOutputFileName

SetOutputPort

SetOutputProgram

SetPrinter

SupportOutputType

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


 CLX Reference

TPrinter methods

TPrinter	By object	Legend

Abort

AfterConstruction

BeforeDestruction

BeginDoc

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

EndDoc

ExecuteSetup

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

NewPage

SafeCallException

SetOutputFileName

SetOutputPort

SetOutputProgram

SetPrinter

SupportOutputType


TPrinter.Abort
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 being 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.NewPage
 CLX 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.ExecuteSetup
 CLX Reference

TPrinter.ExecuteSetup

TPrinter	See also 	Example

Calls the PrintAdapter’s setup dialog box.

function ExecuteSetup: Boolean;

Description

Launches the current PrintAdapter’s setup dialog box. Descendants of TPrintAdapter should implement this method in the descendant class.


TPrinter.SetOutputFileName
 CLX Reference

TPrinter.SetOutputFileName

TPrinter	See also 	Example

Sets the output filename if the print job is to be directed to a file.

function SetOutputFileName(Value: string): Boolean;

Description

If the currently used PrintAdapter supports as output a file type, this function will set the filename for the file and return True if successful.


TPrinter.SetOutputPort
 CLX Reference

TPrinter.SetOutputPort

TPrinter	See also 	Example

Sets the output port for the current print job.

function SetOutputPort(Value: string): Boolean;

Description

If the currently used PrintAdapter supports as output a port, this function will set the port and return True if successful.


TPrinter.SetOutputProgram
 CLX Reference

TPrinter.SetOutputProgram

TPrinter	See also 	Example

Calls the PrintAdapter to set the output of the printing to the specified program.

function SetOutputProgram(Value: string): Boolean;

Description

If the currently used PrintAdapter supports as output a program, this function will set the program name and return True if successful.


TPrinter.SetPrinter
 CLX 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


TApplicationStyle
 CLX Reference

TApplicationStyle

Hierarchy	Properties	Methods	Events	See also

Specifies a set of defaults for drawing the widgets in a CLX application.

Unit

QStyle

Description

TApplicationStyle represents the style used to paint objects in a CLX application. A style gives an application its “look and feel”.

Do not create instances of TApplicationStyle. It is the type of the Style property on the global Application object. Thus, there is only one TApplicationStyle object, and it is created by the Application object. To change the application’s style, assign new values to the TApplicationStyle properties or provide event handlers for its events. You can also customize the style by choosing a predefined style as the value of the DefaultStyle property.

The Application object’s Style property represents the default style that is used by all widgets in the application. Component writers can override this default by setting the Style property on an individual widget class.


 CLX Reference

TApplicationStyle properties

TApplicationStyle	Alphabetically	Legend

In TApplicationStyle

DefaultStyle

Derived from TStyle

ButtonShift

CheckSize

DefaultFrameWidth

Handle

Hooks

MaxSliderDragDistance

RadioSize

SliderLength


 CLX Reference

TApplicationStyle properties

TApplicationStyle	By object	Legend

ButtonShift

CheckSize

DefaultFrameWidth

DefaultStyle

Handle

Hooks

MaxSliderDragDistance

RadioSize

SliderLength


TApplicationStyle.DefaultStyle
 CLX Reference

TApplicationStyle.DefaultStyle

TApplicationStyle

Specifies a predefined style configuration that is used by default.

type TDefaultStyle = (dsWindows, dsMotif, dsMotifPlus, dsCDE, dsQtSGI, dsPlatinum, dsSystemDefault);

property DefaultStyle: TDefaultStyle;

Description

Set DefaultStyle to use one of the predefined styles as a starting point for the style. Each DefaultStyle value represents a basic “look and feel” for the widgets in the application. You can further customize any of these styles by using the TApplicationStyle properties or supplying event handlers to the TApplicationStyle events.

Warning:	The value of DefaultStyle must be supported by the desktop on which the application is running.


 CLX Reference

TApplicationStyle events

TApplicationStyle	Alphabetically	Legend

In TApplicationStyle

OnPolish

Derived from TStyle

AfterDrawButton

AfterDrawItem

AfterDrawMenuItem

BeforeDrawButton

BeforeDrawItem

BeforeDrawMenuItem

ButtonRect

ComboButtonFocusRect

ComboButtonRect

DrawArrow

DrawButtonFrame

DrawButtonLabel

DrawButtonMask

DrawCheck

DrawCheckMask

DrawComboButton

DrawComboButtonMask

DrawFocusRect

DrawFrame

DrawHeaderSection

DrawHint

DrawMenuCheck

DrawMenuFrame

DrawRadio

DrawRadioMask

DrawScrollBar

DrawSplitter

DrawTab

DrawTabMask

DrawTrackBar

DrawTrackBarGroove

DrawTrackBarGrooveMask

DrawTrackBarMask

ExtraMenuItemWidth

GetItemRect

HeaderSectionRect

MenuItemHeight

OnChange

ScrollBarMetrics

SubmenuIndicatorWidth

TabMetrics


 CLX Reference

TApplicationStyle events

TApplicationStyle	By object	Legend

AfterDrawButton

AfterDrawItem

AfterDrawMenuItem

BeforeDrawButton

BeforeDrawItem

BeforeDrawMenuItem

ButtonRect

ComboButtonFocusRect

ComboButtonRect

DrawArrow

DrawButtonFrame

DrawButtonLabel

DrawButtonMask

DrawCheck

DrawCheckMask

DrawComboButton

DrawComboButtonMask

DrawFocusRect

DrawFrame

DrawHeaderSection

DrawHint

DrawMenuCheck

DrawMenuFrame

DrawRadio

DrawRadioMask

DrawScrollBar

DrawSplitter

DrawTab

DrawTabMask

DrawTrackBar

DrawTrackBarGroove

DrawTrackBarGrooveMask

DrawTrackBarMask

ExtraMenuItemWidth

GetItemRect

HeaderSectionRect

MenuItemHeight

OnChange

OnPolish

ScrollBarMetrics

SubmenuIndicatorWidth

TabMetrics


TApplicationStyle.OnPolish
 CLX Reference

TApplicationStyle.OnPolish

TApplicationStyle	See also

Occurs after the Application object is created but before any painting has begun.

property OnPolish: TPolishEvent;

Description

Write an OnPolish event handler to set any properties of the Application object that affect the appearance of the application before painting begins.


 CLX Reference

TApplicationStyle methods

TApplicationStyle	Alphabetically	Legend

In TApplicationStyle

Destroy

Derived from TStyle

Create

GetHooks

HandleNeeded

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


 CLX Reference

TApplicationStyle methods

TApplicationStyle	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetHooks

GetInterface

GetInterfaceEntry

GetInterfaceTable

HandleNeeded

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Refresh

SafeCallException


TApplicationStyle.Destroy
 CLX Reference

TApplicationStyle.Destroy

TApplicationStyle	See also

Frees a TApplicationStyle object.

destructor Destroy; override;

Description

Typically, applications do not free TApplicationStyle objects; they are freed by the object that uses them to implement its Style property. If you do need to free a TApplicationStyle object,, use the Free method, which checks that the object reference is not nil before calling Destroy.


Hierarchy

TObject

TStyle

TApplicationStyle


TBasicActionLink
 CLX 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.


 CLX Reference

TBasicActionLink properties

TBasicActionLink	Alphabetically	Legend

In TBasicActionLink

Action


 CLX Reference

TBasicActionLink properties

TBasicActionLink	By object	Legend

Action


TBasicActionLink.Action
 CLX 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.


 CLX Reference

TBasicActionLink events

TBasicActionLink	Alphabetically	Legend

In TBasicActionLink

OnChange


 CLX Reference

TBasicActionLink events

TBasicActionLink	By object	Legend

OnChange


TBasicActionLink.OnChange
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TBaseDragControlObject
 CLX Reference

TBaseDragControlObject

Hierarchy	Properties	Methods	See also

TBaseDragControlObject object provides support for drag-and-drop or drag-and-dock operations.

Unit

QControls

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.


 CLX Reference

TBaseDragControlObject Properties

TBaseDragControlObject	Alphabetically	Legend

In TBaseDragControlObject

Control

Derived from TDragObject

DragTargetPos

IsInterAppDrag

KeyState


 CLX Reference

TBaseDragControlObject Properties

TBaseDragControlObject	By Object	Legend

Control

DragTargetPos

IsInterAppDrag

KeyState


TBaseDragControlObject.Control
 CLX 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.


 CLX Reference

TBaseDragControlObject Methods

TBaseDragControlObject	Alphabetically	Legend

In TBaseDragControlObject

Assign

Create

Destroy

EndDrag

Finished

Derived from TDragObject

HideDragImage

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


 CLX 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

HideDragImage

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

ShowDragImage


TBaseDragControlObject.Assign
 CLX 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
 CLX 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.Destroy
 CLX Reference

TBaseDragControlObject.Destroy

TDragControlObject	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.In TDragControlObject, Destroy informs Control that it no longer has a DragObject, then calls the inherited destructor.


TBaseDragControlObject.EndDrag
 CLX 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
 CLX 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


TBitBtn
 CLX 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

QButtons

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.


 CLX Reference

TBitBtn properties

TBitBtn	Alphabetically	Legend

In TBitBtn

Glyph

Kind

Layout

Margin

NumGlyphs

Spacing

Derived from TButton

Cancel

Default

Handle

ModalResult

ToggleButton

Derived from TButtonControl

Caption

Checked

Derived from TWidgetControl

Bitmap

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Masked

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

Down

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TBitBtn properties

TBitBtn	By object	Legend

Action

Align

Anchors

Bitmap

BoundsRect

Brush

Cancel

Caption

Checked

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

Default

DesignInfo

Down

DragMode

Enabled

Font

Glyph

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Kind

Layout

Left

Margin

Masked

ModalResult

Name

NumGlyphs

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ShowHint

Showing

Spacing

TabOrder

TabStop

Tag

ToggleButton

Top

Visible

Width


TBitBtn.Glyph
 CLX 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 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
 CLX 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	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	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	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	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	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	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	The “Abort” appear on the button face.

bkRetry	The text “Retry” appear on the button face.

bkIgnore	The text “Ignore” appear on the button face. Use it to allow the user to continue after an error has occurred.

bkAll	The text “Yes to All” appear on the button face.


TBitBtn.Layout
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TBitBtn events

TBitBtn	Alphabetically	Legend

Derived from TButton

OnToggled

Derived from TButtonControl

OnStateChanged

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TBitBtn events

TBitBtn	By object	Legend

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag

OnStateChanged

OnToggled


 CLX Reference

TBitBtn methods

TBitBtn	Alphabetically	Legend

In TBitBtn

Click

Create

Destroy

Derived from TButtonControl

AccelChar

AnimateClick

Toggle

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TBitBtn methods

TBitBtn	By object	Legend

AccelChar

AfterConstruction

AnimateClick

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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Toggle

Update

UpdateAction

UpdateControlState


TBitBtn.Click
 CLX 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.

Note:	To simulate a mouse click including the visual appearance of the mouse button going down, use the AnimateClick method instead.


TBitBtn.Create
 CLX 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
 CLX 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

TWidgetControl

TButtonControl

TButton

TBitBtn


TBitmap
 CLX Reference

TBitmap

Hierarchy	Properties	Methods	Events	See also

TBitmap is an encapsulation of a matrix of pixels that defines an image.

Unit

QGraphics

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 maintains two internal images of a bitmap graphic. One representation of the image is called a pixmap and the other representation of the image is called an image. When using CLX under Linux, the two internal representations, the pixmap and the image, are maintained on the X server and internally by the application itself, respectively. Under Windows, the pixmap is stored as a DDB (Device Dependent Bitmap) and the image is stored as a DIB (Device Independent Bitmap).

When a bitmap is modified, the image is directly manipulated and not the pixmap. The pixmap is internally kept in sync with the image, so any changes to the image are automatically copied to the underlying pixmap. When the bitmap is drawn to the screen, it is the pixmap that is actually drawn and not the image.

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).


 CLX Reference

TBitmap Properties

TBitmap	Alphabetically	Legend

In TBitmap

Canvas

Empty

Format

Handle

Height

Monochrome

PixelFormat

ScanLine

Transparent

TransparentColor

TransparentMode

Width

Derived from TGraphic

Modified


 CLX Reference

TBitmap Properties

TBitmap	By Object	Legend

Canvas

Empty

Format

Handle

Height

Modified

Monochrome

PixelFormat

ScanLine

Transparent

TransparentColor

TransparentMode

Width


TBitmap.Canvas
 CLX 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.

Note:	An exception will be raised if there is an attempt to operate on a null pixmap.


TBitmap.Empty
 CLX 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.Format
 CLX Reference

TBitmap.Format

TBitmap	See also

Indicates the format of the pixmap.

property Format: string;

Description

Use Format to get or set the format this object uses when reading or writing images.


TBitmap.Handle
 CLX Reference

TBitmap.Handle

TBitmap 	See also

Provides access to the unique 4-byte identifier that represents the instance of a Qt QPixmap object.

property Handle: HPixmapH;

Description

The Handle property provides access to the unique 4-byte identifier that represents the instance of a Qt QPixmap object.

Use Handle to return a typed pointer to the instance of the underlying QPixmap object. This Handle can be used when making low-level function calls into the Qt shared libraries, where the function call requires an instance pointer to a QPixmap object.


TBitmap.Height
 CLX 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.::MaskHandle
 CLX 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
 CLX 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.PixelFormat
 CLX 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 = (pf1bit, pf8bit, pf16bit, 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
 CLX 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.Transparent
 CLX Reference

TBitmap.Transparent

TBitmap 	See also

Indicates whether the image covers its rectangular area.

property Transparent: Boolean;

Description

Use Transparent to specify that the bitmap image be drawn transparently. The TImage component sets this property to be the same as its Transparent property to achieve transparent painting.

Note:	This property does not work for bitmaps that are applied to a brush. That is because the bitmap on a brush is tiled to create a texture, and hence should be rectangular. The Transparent property is typically used to create a bitmap that is not rectangular.


TBitmap.TransparentColor
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TBitmap events

TBitmap	Alphabetically	Legend

Derived from TGraphic

OnChange

OnProgress


 CLX Reference

TBitmap events

TBitmap	By object	Legend

OnChange

OnProgress


 CLX Reference

TBitmap Methods

TBitmap	Alphabetically	Legend

In TBitmap

Assign

AssignsTo

ColorTable

Create

Destroy

Dormant

FreeImage

FreePixmap

LoadFromMimeSource

LoadFromResourceID

LoadFromResourceName

LoadFromStream

Mask

ReleasePixmap

SaveToMimeSource

SaveToStream

Derived from TGraphic

Assigns

LoadFrom

LoadFromFile

SaveTo

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


 CLX Reference

TBitmap Methods

TBitmap	By Object	Legend

AfterConstruction

Assign

Assigns

AssignsTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ColorTable

Create

DefaultHandler

Destroy

Dispatch

Dormant

FieldAddress

Free

FreeImage

FreeInstance

FreePixmap

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LoadFrom

LoadFromFile

LoadFromMimeSource

LoadFromResourceID

LoadFromResourceName

LoadFromStream

Mask

MethodAddress

MethodName

NewInstance

ReleasePixmap

SafeCallException

SaveTo

SaveToFile

SaveToMimeSource

SaveToStream


TBitmap.Assign
 CLX Reference

TBitmap.Assign

TBitmap	See also

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.AssignsTo
 CLX Reference

TBitmap.AssignsTo

TBitmap 	See also

Indicates whether the bitmap can be assigned to a specified graphics class.

class function AssignsTo(Dest: TGraphicClass): Boolean; override;

Description

Call AssignsTo to determine whether this bitmap is compatible with the image in another, specified graphic class.

Dest is the class to which you want to assign this bitmap.

AssignsTo returns True if this bitmap can be assigned to the specified class, False otherwise.


TBitmap.ColorTable
 CLX Reference

TBitmap.ColorTable

TBitmap

Returns a pointer to the underlying color table.

function ColorTable: Pointer;

Description

Call ColorTable to access the color table pointer, which is used by the underlying widget.


TBitmap.Create
 CLX 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 sets the Format to BMP.


TBitmap.Destroy
 CLX 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 both, the internal pixmap and internal image, before calling the inherited destructor.


TBitmap.Dormant
 CLX Reference

TBitmap.Dormant

TBitmap	See also

Creates a client-side memory bitmap image in order to release the server-side pixmap, 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
 CLX Reference

TBitmap.FreeImage

TBitmap

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.FreePixmap
 CLX Reference

TBitmap.FreePixmap

TBitmap 	See also

Frees the internally cached pixmap for this bitmap.

procedure FreePixmap;

Description

Use FreePixmap when the current image is no longer needed. FreePixmap frees the pixmap that the underlying widget uses to draw to the screen.


TBitmap.LoadFromMimeSource
 CLX Reference

TBitmap.LoadFromMimeSource

TBitmap 	See also

Loads the image from a TClxMimeSource object.

procedure LoadFromMimeSource(MimeSource: TClxMimeSource); override;

Description

LoadFromMimeSource loads the bitmap image from a TClxMimeSource object. If the TClxMimeSource object can’t supply a bitmap image, LoadFromMimeSource does nothing.


TBitmap.LoadFromResourceID
 CLX 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
 CLX Reference

TBitmap.LoadFromResourceName

TBitmap	See also	Example

Loads a bitmap resource into the bitmap object.

procedure LoadFromResourceName(Instance: Cardinal; 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.


TBitmap.LoadFromStream
 CLX 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
 CLX 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.ReleasePixmap
 CLX Reference

TBitmap.ReleasePixmap

TBitmap 	See also

Dissociates the bitmap from its underlying pixmap.

function ReleasePixmap: QPixmapH;

Description

Use ReleasePixmap to obtain the handle to the underlying pixmap. Once you call ReleasePixmap, the bitmap object relinquishes its ownership of the pixmap. Use this method when you need to give a pixmap handle to a routine or object that will assume ownership (or destroy) the pixmap.


TBitmap.SaveToMimeSource
 CLX Reference

TBitmap.SaveToMimeSource

TBitmap 	See also

Saves the bitmap to a TClxMimeSource object.

procedure SaveToMimeSource(MimeSource: TClxMimeSource); override;

Description

SaveToMimeSource saves the bitmapped image to a TClxMimeSource object.


TBitmap.SaveToStream
 CLX 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

TGraphic

TBitmap


TBits
 CLX 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.


 CLX Reference

TBits properties

TBits	Alphabetically	Legend

In TBits

Bits

Size


 CLX Reference

TBits properties

TBits	By object	Legend

Bits

Size


TBits.Bits
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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


TBrushRecall
 CLX Reference

TBrushRecall

Hierarchy	Properties	Methods	See also

TBrushRecall saves and restores a TBrush object.

Unit

QGraphics

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.


 CLX Reference

TBrushRecall properties

TBrushRecall	Alphabetically	Legend

Derived from TRecall

Reference


 CLX Reference

TBrushRecall properties

TBrushRecall	By object	Legend

Reference


 CLX 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


 CLX 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
 CLX 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


TCustomImageList
 CLX 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

QImgList

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.


 CLX Reference

TCustomImageList properties

TCustomImageList	Alphabetically	Legend

In TCustomImageList

BkColor

Count

Height

Masked

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TCustomImageList properties

TCustomImageList	By object	Legend

BkColor

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Count

DesignInfo

Height

Masked

Name

Owner

Tag

Width


TCustomImageList.BkColor
 CLX 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.Count
 CLX 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.Height
 CLX 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.Masked
 CLX 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.


TCustomImageList.Width
 CLX 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.


 CLX Reference

TCustomImageList events

TCustomImageList	Alphabetically	Legend

In TCustomImageList

OnChange


 CLX Reference

TCustomImageList events

TCustomImageList	By object	Legend

OnChange


TCustomImageList.OnChange
 CLX 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.


 CLX Reference

TCustomImageList methods

TCustomImageList	Alphabetically	Legend

In TCustomImageList

Add

AddImages

AddMasked

Assign

Change

Clear

Create

CreateSize

DefineProperties

Delete

Destroy

Draw

GetBitmap

GetMask

GetPixmap

Initialize

Insert

InsertMasked

Move

ReadData

RegisterChanges

Replace

ReplaceMasked

UnRegisterChanges

WriteData

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

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


 CLX Reference

TCustomImageList methods

TCustomImageList	By object	Legend

Add

AddImages

AddMasked

AfterConstruction

Assign

BeforeDestruction

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

CreateSize

DefaultHandler

DefineProperties

Delete

Destroy

DestroyComponents

Destroying

Dispatch

Draw

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetBitmap

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetMask

GetNamePath

GetParentComponent

GetPixmap

HasParent

InheritsFrom

Initialize

InitInstance

Insert

InsertComponent

InsertMasked

InstanceSize

IsImplementorOf

MethodAddress

MethodName

Move

NewInstance

ReadData

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

Replace

ReplaceMasked

SafeCallException

SetSubComponent

UnRegisterChanges

UpdateAction

WriteData


TCustomImageList.Add
 CLX 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.AddImages
 CLX 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
 CLX 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
 CLX 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 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.Change
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.Draw
 CLX Reference

TCustomImageList.Draw

TCustomImageList	See also

Draws the image specified by the Index parameter onto the provided Canvas.

procedure Draw(Canvas: TCanvas; X, Y, Index: Integer; AImageType: TImageType = itImage; 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.

AImageType indicates whether to draw the image or its associated mask.

Enabled indicates whether the image appears as a gray-mapped image. If Enabled is False, Draw renders a gray-mapped version of the image.


TCustomImageList.GetBitmap
 CLX 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.GetMask
 CLX Reference

TCustomImageList.GetMask

TCustomImageList	See also

Returns a handle to a bitmap that represents a specified mask.

function GetMask(Index: Integer): QBitmapH;

Description

Use GetMask to obtain a handle for the underlying Qt bitmap of a mask.

Index indicates which mask is desired, where 0 specifies the mask for the first image, 1 specifies the mask for the second image, and so on.


TCustomImageList.GetPixmap
 CLX Reference

TCustomImageList.GetPixmap

TCustomImageList	See also

Returns a handle to the underlying pixmap of an image in the list.

function GetPixmap(Index: Integer): QPixmapH;

Description

Use GetPixmap to obtain a handle for the underlying Qt pixmap of an image in the list.

Index indicates which image is desired, where 0 specifies the first image, 1 specifies the second image, and so on.


TCustomImageList.Initialize
 CLX Reference

TCustomImageList.Initialize

TCustomImageList	See also

Initializes a newly allocated image list.

procedure Initialize(const AWidth, AHeight: Integer); 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.

AWidth and AHeight indicate the width and height, in pixels, for every image in the list.


TCustomImageList.Insert
 CLX 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.InsertMasked
 CLX 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
 CLX Reference

TCustomImageList.Move

TCustomImageList	See also

Moves a specified image to another position.

procedure Move(CurIndex, NewIndex: Integer); virtual;

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.ReadData
 CLX Reference

TCustomImageList.ReadData

TCustomImageList	See also

Reads the images in the image list from a stream.

procedure ReadData(Stream: TStream); virtual;

Description

Call ReadData to load a set of images into the image list. Those images must have been previously written by a call to the WriteData method of an image list.

Stream is the stream that contains the images.


TCustomImageList.RegisterChanges
 CLX 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
 CLX 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.ReplaceMasked
 CLX 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.UnRegisterChanges
 CLX 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.


TCustomImageList.WriteData
 CLX Reference

TCustomImageList.WriteData

TCustomImageList	See also

Writes the images in the image list to a stream.

procedure WriteData(Stream: TStream); virtual;

Description

Call WriteData to save the set of images in the image list. Those images can later be read using the ReadData method of an image list.

Stream is the stream to which the images are written.


Hierarchy

TObject

TPersistent

TComponent

TCustomImageList


TCustomListBox
 CLX Reference

TCustomListBox

Hierarchy	Properties	Methods	Events	See also

TCustomListBox is the base class for listbox objects that are wrappers for list box widgets.

Unit

QStdCtrls

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.


 CLX Reference

TCustomListBox properties

TCustomListBox	Alphabetically	Legend

In TCustomListBox

Canvas

ChildHandle

ColumnLayout

Columns

ExtendedSelect

Handle

ItemHeight

ItemIndex

Items

MultiSelect

RowLayout

Rows

SelCount

Selected

Sorted

Style

TopIndex

Derived from TWidgetControl

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomListBox Properties

TCustomListBox	By Object	Legend

Action

Align

Anchors

BoundsRect

Brush

Canvas

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ColumnLayout

Columns

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

ExtendedSelect

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

ItemHeight

ItemIndex

Items

Left

MultiSelect

Name

Owner

Parent

ParentColor

ParentWidget

RowLayout

Rows

SelCount

Selected

ShowHint

Showing

Sorted

Style

TabOrder

TabStop

Tag

Top

TopIndex

Visible

Width


TCustomListBox.Canvas
 CLX 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.ChildHandle
 CLX Reference

TCustomListBox.ChildHandle

TCustomListBox	See also

Surfaces the handle of a child widget that is used to implement the list box.

property ChildHandle: QWidgetH;

Description

TWidgetControl introduces ChildHandle to provide access to the Qt handle for an auxiliary widget that acts as a parent to any child controls. If there is only one widget used to implement a control, the value of ChildHandle is the same as Handle.

In TCustomListBox, ChildHandle differs from the Handle property. It is the handle of a Qt viewport object that represents the visible client area of the list box.


TCustomListBox.ColumnLayout
 CLX Reference

TCustomListBox.ColumnLayout

TCustomListBox	See also

Determines the number of columns that appear in the list box.

property ColumnLayout: TListBoxLayout;

Description

ColumnLayout controls how the list box lays out its items into columns. It can have one of the following values:

Value	Meaning

llFixedNumber	There is a fixed number of columns as specified by the Columns property.

llFitToWidth	The number of columns is set to the maximum number of columns that can fit within the width of the list box and not truncate any items.

llVariable	The number of columns is as many as necessary to display all items given the limitations imposed by the RowLayout and Rows properties.

A list box must have either ColumnLayout or RowLayout set to llVariable. Thus, setting ColumnLayout to llFixedNumber or llFitToWidth causes RowLayout to become llVariable, and setting RowLayout to llFixedNumber or llFitToWidth causes ColumnLayout to become llVariable. A list box can’t have both ColumnLayout and RowLayout set to llVariable.


TCustomListBox.Columns
 CLX Reference

TCustomListBox.Columns

TCustomListBox	See also

Specifies the number of columns that the list box uses to display its items.

property Columns: Integer;

Description

Set Columns to indicate the number of columns in a list box that has a ColumnLayout of llFixedNumber.

When Columns is set to a value other then zero (the default), the ColumnLayout, Rows, and RowLayout properties are automatically set to llFixedNumber, 1 and llVariable, respectively.


TCustomListBox.ExtendedSelect
 CLX 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.Handle
 CLX Reference

TCustomListBox.Handle

TCustomListBox	See also

Specifies the handle of the underlying Qt Widget.

property Handle: QListBoxH;

Description

Handle is a 4-byte identifier that uniquely represents the underlying Widget instance. Use this handle when making low-level function calls into the Qt shared libraries, where the function call requires an instance handle.


TCustomListBox.ItemHeight
 CLX 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
 CLX 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
 CLX 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
 CLX 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.RowLayout
 CLX Reference

TCustomListBox.RowLayout

TCustomListBox	See also

Determines the type of row layout used for the list box.

property RowLayout: TListBoxLayout;

Description

RowLayout controls how the list box lays out its items into rows. It can have one of the following values:

Value	Meaning

llFixedNumber	There is a fixed number of rows as specified by the Rows property.

llFitToWidth	The number of rows is set to the maximum number that can fit within the height of the list box.

llVariable	The number of rows is as many as necessary to display all items given the limitations imposed by the ColumnLayout and Columns properties.

A list box must have either ColumnLayout or RowLayout set to llVariable. Thus, setting ColumnLayout to llFixedNumber or llFitToWidth causes RowLayout to become llVariable, and setting RowLayout to llFixedNumber or llFitToWidth causes ColumnLayout to become llVariable. A list box can’t have both ColumnLayout and RowLayout set to llVariable.


TCustomListBox.Rows
 CLX Reference

TCustomListBox.Rows

TCustomListBox	See also

Specifies the number of rows that the list box uses to display its items.

property Rows: Integer;

Description

Set Rows to indicate the number of rows in a list box that has a RowLayout of llFixedNumber.

When Rows is set to a value other then zero (the default), the RowLayout, Columns, and ColumnLayout properties are automatically set to llFixedNumber, 1 and llVariable, respectively.


TCustomListBox.SelCount
 CLX 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
 CLX 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
 CLX 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.


TCustomListBox.Style
 CLX Reference

TCustomListBox.Style

TCustomListBox	See also

Determines whether the list box is standard or owner-draw.

type TListBoxStyle = (lbStandard, lbOwnerDrawFixed, lbOwnerDrawVariable);

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.

By default, Style is lbStandard, meaning that the list box 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.


TCustomListBox.TopIndex
 CLX 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.


 CLX Reference

TCustomListBox events

TCustomListBox	Alphabetically	Legend

In TCustomListBox

OnDrawItem

OnMeasureItem


 CLX Reference

TCustomListBox events

TCustomListBox	By object	Legend

In TCustomListBox

OnDrawItem

OnMeasureItem


TCustomListBox.OnDrawItem
 CLX 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
 CLX 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: TWidgetControl; 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.


 CLX Reference

TCustomListBox methods

TCustomListBox	Alphabetically	Legend

In TCustomListBox

Changed

Clear

ClearSelection

Create

CreateWidget

DblClick

DeleteString

Destroy

DrawItem

EnabledChanged

EventFilter

FontChanged

GetChildHandle

GetItemData

HookEvents

InitWidget

ItemAtPos

ItemRect

ItemVisible

Loaded

MakeCurrentVisible

MeasureItem

MouseDown

ResetContent

RestoreWidgetState

SaveWidgetState

SetItemData

Sort

Update

VisibleItemCount

WidgetDestroyed

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomListBox Methods

TCustomListBox	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Changed

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

CreateWidget

DblClick

DefaultHandler

DeleteString

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

DrawItem

EnableAlign

EnabledChanged

EndDrag

EventFilter

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

FontChanged

Free

FreeInstance

FreeNotification

GetChildHandle

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItemData

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

HookEvents

InheritsFrom

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

ItemAtPos

ItemRect

ItemVisible

Loaded

MakeCurrentVisible

MeasureItem

MethodAddress

MethodName

MouseDown

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ResetContent

RestoreWidgetState

SafeCallException

SaveWidgetState

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetItemData

SetSubComponent

Show

Sort

Update

UpdateAction

UpdateControlState

VisibleItemCount

WidgetDestroyed


TCustomListBox.Changed
 CLX Reference

TCustomListBox.Changed

TCustomListBox	See also

Responds when the selected item changes.

procedure Changed; virtual;

Description

The protected Changed method is called automatically when the selection in the list box changes. As implemented in TCustomListBox, Changed does nothing. Descendant classes can override this method to respond when the selected item changes.


TCustomListBox.Clear
 CLX 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
 CLX 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.Create
 CLX 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.CreateWidget
 CLX Reference

TCustomListBox.CreateWidget

TCustomListBox	See also

Creates the underlying Qt QListBox widget.

procedure CreateWidget; virtual;

Description

CreateWidget creates the underlying Qt QListBox widget and also creates and installs the Qt event Hook object that is associated with the widget. CreateWidget should never need to be overridden in descendents of the TCustomListBox class. The inherited method should never be called when this method is overridden.


TCustomListBox.DblClick
 CLX Reference

TCustomListBox.DblClick

TCustomListBox	See also

Responds when the user double-clicks in the list box.

procedure DblClick; override;

Description

DblClick is called automatically when the user double-clicks in the list box. TCustomListBox overrides the inherited method to select the item under the mouse.


TCustomListBox.::DeleteString
 CLX 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
 CLX 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.DrawItem
 CLX 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.EnabledChanged
 CLX Reference

TCustomListBox.EnabledChanged

TCustomListBox	See also

Forces a repaint to reflect the change to the Enabled property.

procedure EnabledChanged; override;

Description

EnabledChanged is called automatically when the Enabled property changes. TCustomListBox overrides the inherited method to force a brush change and repaint so that the list box correctly reflects its new state.


TCustomListBox.EventFilter
 CLX Reference

TCustomListBox.EventFilter

TCustomListBox	See also

Responds to system events.

function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; override;

Description

EventFilter is called automatically in response to events detected by the underlying widget. Such events include mouse events, keyboard events, system changes (such as changes to the palette), and changes to the underlying widget (moves, resizes, or the need to repaint). EventFilter gives the control an opportunity to respond to the event that occurred.

Sender is the handle to the underlying widget that receives the event. This is the same as the Handle property.

Event is the handle to the Qt event object. This object provides information about the event that occurred.

EventFilter returns True if the list box handles the event, False otherwise.

TCustomListBox overrides the inherited method to suppress the underlying widget’s default response to right mouse clicks, and to paint or erase the focus rectangle when the list box gains or loses focus.

Note:	When overriding the EventFilter method, be sure to call the inherited method so that the default event processing can occur.


TCustomListBox.FontChanged
 CLX Reference

TCustomListBox.FontChanged

TCustomListBox	See also

Adjusts the item height when the font used to draw list items changes.

procedure FontChanged; override;

Description

FontChanged is called automatically when the Font property changes. TCustomListBox overrides the inherited method to recompute the value of the ItemHeight property if the list box is not owner-drawn.


TCustomListBox.GetChildHandle
 CLX Reference

TCustomListBox.GetChildHandle

TCustomListBox	See also

Returns the value of the ChildHandle property.

function GetChildHandle: QWidgetH; override;

Description

GetChildHandle is the protected read implementation of the ChildHandle property. It overrides the inherited method to return the handle to the associated Qt viewport object, which represents the visible client area of the list box.


TCustomListBox.GetItemData
 CLX 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.HookEvents
 CLX Reference

TCustomListBox.HookEvents

TCustomListBox	See also

Registers callbacks for handling system event events and widget signals.

procedure HookEvents; override;

Description

HookEvents is called automatically when the underlying widget is created. It registers the callbacks that allow a control to respond to events detected by the widget.

In TCustomListBox, HookEvents registers several callbacks for responding to mouse, paint, and selection events . HookEvents also calls the inherited method, which registers the EventFilter method to respond to all system events.

Note:	When overriding the HookEvents method, be sure to call the inherited method so that ancestor classes can register their own callbacks. For more information about overriding HookEvents, see TWidgetControl.HookEvents.


TCustomListBox.InitWidget
 CLX Reference

TCustomListBox.InitWidget

TCustomListBox	See also

Initializes the underlying Qt widget before it is displayed after it has been created.

procedure InitWidget; override;

Description

InitWidget is called internally after the CreateWidget method is called. InitWidget initializes the underlying Qt widget prior to the widget being displayed after it has been created.

Override InitWidget to specify how the widget is to be displayed after it has been created. When overriding InitWidget the inherited method should be called.


TCustomListBox.ItemAtPos
 CLX 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
 CLX 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.ItemVisible
 CLX Reference

TCustomListBox.ItemVisible

TCustomListBox	See also

Returns whether an item is in the current visible client area (viewport) of the list box.

function ItemVisible(Index: Integer): Boolean;

Description

Call ItemVisible to determine if an item, specified by the Index parameter, is currently visible in the visible client area of the list box. If an item is not visible, ItemVisible returns False.


TCustomListBox.Loaded
 CLX Reference

TCustomListBox.Loaded

TCustomListBox	See also

Initializes the list box when its form has been loaded into memory.

procedure Loaded; virtual;

Description

Do not call the protected Loaded method. The streaming system calls this method after it loads the form that owns this list box.

As implemented in TCustomListBox, Loaded forces the underlying Widget to accurately reflect the value of the Columns property.


TCustomListBox.MakeCurrentVisible
 CLX Reference

TCustomListBox.MakeCurrentVisible

TCustomListBox

Moves the currently selected item into the visible client area (viewport) of the list box if it is not already visible.

procedure MakeCurrentVisible;

Description

The list box maintains a virtual scrolling area that the client area (viewport) of the list box can display, the actual display area is set by the list box's Height and Width properties. If the currently selected item is not in the visible client area, MakeCurrentVisible will reposition the viewport in the virtual scrolling area so that the currently selected item is visible in the viewport.


TCustomListBox.MeasureItem
 CLX Reference

TCustomListBox.MeasureItem

TCustomListBox	See also

Generates an OnMeasureItem event.

procedure MeasureItem(Control: TWidgetControl; Index: Integer; var Height, Width: 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 and width of the item. Since Height and Width are passed by reference (arevar parameters), MeasureItem can increase or reduce the height and widthof 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.MouseDown
 CLX Reference

TCustomListBox.MouseDown

TCustomListBox

Handles mouse button clicks.

procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

MouseDown is called automatically when the user clicks in the list box with the mouse. After generating an OnMouseDown event, MouseDown determines whether or not an item exists at a the point X,Y in the list box and then calls the inherited MouseDown method.

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.


TCustomListBox.ResetContent
 CLX 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.RestoreWidgetState
 CLX Reference

TCustomListBox.RestoreWidgetState

TCustomListBox	See also

Restores the items in the Items property of the list box, when the underlying widget needs to be destroyed and recreated.

procedure RestoreWidgetState; override;

Description

When the underlying widget for the list box needs to be destroyed and recreated, SaveWidgetState is called automatically before the widget is destroyed to save the current state of the widget. When the widget is recreated, RestoreWidgetState is automatically called to restore previous state of the widget. Do not call SaveWidgetState directly.


TCustomListBox.SaveWidgetState
 CLX Reference

TCustomListBox.SaveWidgetState

TCustomListBox	See also

Restores the items in the Items property of the list box, when the underlying widget needs to be destroyed and recreated.

procedure SaveWidgetState; override;

Description

When the underlying widget for the list box needs to be destroyed and recreated, SaveWidgetState is called before the widget is destroyed to save the current state of the widget. When the widget is recreated, RestoreWidgetState is automatically called to restore previous state of the widget. Do not call RestoreWidgetState directly.


TCustomListBox.SetItemData
 CLX 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.Sort
 CLX Reference

TCustomListBox.Sort

TCustomListBox

Sorts the items in the list box in ascending order.

procedure Sort;

Description

Call Sort to sort the items in the list box in ascending order.


TCustomListBox.Update
 CLX Reference

TCustomListBox.Update

TCustomListBox

Causes the underlying widget to receive an update event.

procedure Update;

Description

TCustomListBox uses update internally to inform the underlying widget when the list box has been updated.


TCustomListBox.VisibleItemCount
 CLX Reference

TCustomListBox.VisibleItemCount

TCustomListBox	See also

Returns the number of item that are currently visible in the client area (viewport) of the list box.

function VisibleItemCount: Integer;

Description

Use VisibleItemCount to return the number of items that are currently visible in the client area (viewport) of the list box.


TCustomListBox.WidgetDestroyed
 CLX Reference

TCustomListBox.WidgetDestroyed

TCustomListBox

Occurs when the underlying widget encapsulated by the list box is destroyed.

procedure WidgetDestroyed; override;

Description

Override WidgetDestroyed to perform any special processing that should occur immediately after the underlying widget encapsulated by the lixt box is destroyed.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomListBox


TCustomTreeView
 CLX Reference

TCustomTreeView

Hierarchy	Properties	Methods	See also

TCustomTreeView is the base type for tree-view components such as TTreeView.

Unit

QComCtrls

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.


 CLX Reference

TCustomTreeView Properties

TCustomTreeView	Alphabetically	Legend

In TCustomTreeView

AutoExpand

DropTarget

ItemMargin

Items

Selected

ShowButtons

SortType

TopItem

Derived from TFrameControl

ClientOrigin

Derived from TWidgetControl

Brush

ChildHandle

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TCustomTreeView Properties

TCustomTreeView	By Object	Legend

Action

Align

Anchors

AutoExpand

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DropTarget

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

ItemMargin

Items

Left

Name

Owner

Parent

ParentWidget

Selected

ShowButtons

ShowHint

Showing

SortType

TabOrder

TabStop

Tag

Top

TopItem

Visible

Width


TCustomTreeView.AutoExpand
 CLX 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.DropTarget
 CLX 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.ItemMargin
 CLX Reference

TCustomTreeView.ItemMargin

TCustomTreeView

Specifies the margin around each item.

property ItemMargin: Integer;

Description

Use ItemMargin to determine the width, in pixels, of the space drawn around each icon. Default is one.

Focus highlighting and the selection rectangle both include the margin area.


TCustomTreeView.Items
 CLX 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.Selected
 CLX 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 OnChange event occurs. 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.


TCustomTreeView.ShowButtons
 CLX 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.SortType
 CLX 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.TopItem
 CLX 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.


 CLX Reference

TCustomTreeView Events

TCustomTreeView	Alphabetically	Legend

In TCustomTreeView

OnChange

OnChanging

OnCollapsed

OnCollapsing

OnDeletion

OnEdited

OnEditing

OnExpanded

OnExpanding

OnGetImageIndex

OnGetSelectedIndex

OnInsert

OnItemClick

OnItemDoubleClick

OnItemEnter

OnItemExitViewportEnter

OnItemMouseDown

OnViewPortMouseDown


 CLX Reference

TCustomTreeView Events

TCustomTreeView	By Object	Legend

OnChange

OnChanging

OnCollapsed

OnCollapsing

OnDeletion

OnEdited

OnEditing

OnExpanded

OnExpanding

OnGetImageIndex

OnGetSelectedIndex

OnInsert

OnItemClick

OnItemDoubleClick

OnItemEnter

OnItemExitViewportEnter

OnItemMouseDown

OnViewPortMouseDown


TCustomTreeView.OnCancelEdit
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.OnDeletion
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


TCustomTreeView.OnInsert
 CLX Reference

TCustomTreeView.OnInsert

TCustomTreeView	See also

Occurs immediately after a new item is inserted into the list view.

type= 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.


TCustomTreeView.OnItemClick
 CLX Reference

TCustomTreeView.OnItemClick

TCustomTreeView 	See Also

Occurs when an item is clicked.

type TTVItemClickEvent = procedure(Sender: TObject; Button: TMouseButton; Item: TListItem;

     Pt: TPoint; ColIndex: Integer) of object;

property OnItemClick: TTVItemClickEvent;

Description

Use OnItemClick to respond to mouse clicks. The OnClick event can also be triggered by keyboard or menu events that are equivalent to mouse clicks. See TControl.OnClick.

The Button parameter indicates which mouse button generated the event. Item is the item the user clicked. Pt gives the client-area location of the click. ColIndex indicates the column containing the item.


TCustomTreeView.OnItemDoubleClick
 CLX Reference

TCustomTreeView.OnItemDoubleClick

TCustomTreeView

Occurs when an item is double-clicked.

type TTVItemDoubleClickEvent = procedure(Sender: TObject; Item: TListItem) of object;

property OnItemDoubleClick: TTVItemDoubleClickEvent;

Description

Use OnItemDoubleClick to respond to double clicks on an item.

The Item parameter identifies the item that was double-clicked.


TCustomTreeView.OnItemEnter
 CLX Reference

TCustomTreeView.OnItemEnter

TCustomTreeView

Occurs when an the mouse pointer enters the item's space.

type TTVItemEnterEvent = procedure(Sender: TObject; Item: TListItem) of object;

property OnItemEnter: TTVItemEnterEvent;

Description

Use OnItemEnter to respond to mouse motion over items. This event occurs when the mouse enters the rectanble used by Item.


TCustomTreeView.OnItemExitViewportEnter
 CLX Reference

TCustomTreeView.OnItemExitViewportEnter

TCustomTreeView

Occurs when the mouse pointer moves from an item to empty viewport area.

TTVItemExitViewportEnterEvent= procedure(Sender: TObject; Item: TListItem) of object;

property OnItemExitViewportEnter: TTVItemExitViewportEnterEvent

Description

Use OnItemExitViewportEnter to respond when the user moves the mouse pointer from an item to empy viewport space not occupied by any item. The Item parameter indicates which item the pointer moved away from


TCustomTreeView.OnItemMouseDown
 CLX Reference

TCustomTreeView.OnItemMouseDown

TCustomTreeView

Occurs when the user presses a mouse button with the mouse pointer over a List View item.

TTVButtonDownEvent = procedure(Sender: TObject; Button: TMouseButton; Item: TListItem; Pt: TPoint; ColIndex: Integer) of object;

property OnItemMouseDown: TTVButtonDownEvent;

Description

Use the OnItemMouseDown to respond when the user presses a mouse button with the mouse pointer over an item. The Item parameter indicates which item the pointer is over. The Pt parameter indicates the pointer's location in the List View viewport. ColIndex indicates which column the pointer is over.


TCustomTreeView.OnViewportMouseDown
 CLX Reference

 KTCustomTreeView.OnViewportMouseDown

TCustomTreeView	See Also

Occurs when the mouse is pressed over empty viewport space.

TTVViewportButtonDownEvent = procedure(Sender: TObject; Button: TMouseButton; Pt: TPoint) of object;

property OnViewPortMouseDown: TTVViewportButtonDownEvent;

Description

Use OnViewPortMouseDown to respond to a mouse press when the pointer is over the empy viewport space not occupied by any item


 CLX Reference

TCustomTreeView Methods

TCustomTreeView	Alphabetically	Legend

In TCustomTreeView

AlphaSort

CanCollapse

CanExpand

Change

Collapse

Create

Delete

Destroy

DoEdited

DoEditing

DoGetImageIndex

Expand

FullCollapse

FullExpand

GetNodeAt

ImageListChanged

IsCustomDrawn

Loaded

LoadFromFile

LoadFromStream

SaveToFile

SaveToStream

SelectAll

Derived from TCustomViewControl

InvertSelection

IsEditing

Sort

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TCustomTreeView Methods

TCustomTreeView	By Object	Legend

AfterConstruction

AlphaSort

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanCollapse

CanExpand

CanFocus

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Collapse

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DoEdited

DoEditing

DoGetImageIndex

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

Expand

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FullCollapse

FullExpand

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetNodeAt

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

ImageListChanged

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvertSelection

InvokeHelp

IsCustomDrawn

IsEditing

IsImplementorOf

Loaded

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

SaveToFile

SaveToStream

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Sort

Update

UpdateAction

UpdateControlState


TCustomTreeView.AlphaSort
 CLX Reference

TCustomTreeView.AlphaSort

TCustomTreeView	See also

Sort tree nodes.

function AlphaSort: Boolean;

Description

Call AlphaSort to sort the nodes of the tree view. If successful, AlphaSort returns True. To have the tree view maintain all nodes in a sorted order (for example, when the user edits the labels), use the SortType property.


TCustomTreeView.CanCollapse
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TCustomTreeView.Change

TCustomTreeView

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.Collapse
 CLX Reference

TCustomTreeView.Collapse

TCustomTreeView

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
 CLX 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, ShowLines to True.


TCustomTreeView.Delete
 CLX 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
 CLX 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
 CLX 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.DoEdited
 CLX Reference

TCustomTreeView.DoEdited

TCustomTreeView	See also

Respond to item editing completion.

procedure DoEdited(AItem: TCustomViewItem; var S: WideString); override;

Description

DoEdited is called automatically when editing of an item has been completed and accepted. As implemented in TCustomTreeView, DoEdited passes its parameters to the OnEdited event handler, if defined.


TCustomTreeView.DoEditing
 CLX Reference

TCustomTreeView.DoEditing

TCustomTreeView	See also

Respond to item editing.

procedure DoEditing(AItem: TCustomViewItem; var AllowEdit: Boolean); override;

Description

DoEditing is called automatically when a user attempts to edit an item. AItem is the item being edited. AllowEdit is set to true; if DoEditing changes AllowEdit to false, editing is canceled.

As implemented in TCustomTreeView, DoEditing passes its parameters to the OnEditing event handler, if defined.


TCustomTreeView.DoGetImageIndex
 CLX Reference

TCustomTreeView.DoGetImageIndex

TCustomTreeView	See also

Respond to item update.

procedure DoGetImageIndex(Item: TCustomViewItem); override;

Description

TCustomTreeView overrides DoGetImageIndex in order to implement the following procedure.

If Item is currently selected, DoGetImageIndex calls the OnGetSelectedIndex event handler (if defined) and then sets the item's icon using its SelectedIndex property.

If item is not currently selected, DoGetImageIndex calls the OnGetImageIndex event handler (if defined) and then sets the item's icon using its ImageIndex property.


TCustomTreeView.Expand
 CLX 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.FullCollapse
 CLX 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
 CLX 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.GetNodeAt
 CLX Reference

TCustomTreeView.GetNodeAt

TCustomTreeView	See also

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.ImageListChanged
 CLX Reference

TCustomTreeView.ImageListChanged

TCustomTreeView

Respond to change in image list.

procedure ImageListChanged; override;

Description

ImageListChanged is called automatically when the control's image list has changed. As implemented in TCustomTreeView, ImageListChanged updates the image for each tree node.


TCustomTreeView.IsCustomDrawn
 CLX Reference

TCustomTreeView.IsCustomDrawn

TCustomTreeView	See also

Specifies when the control should generate custom draw events.

function IsCustomDrawn: Boolean; override;

Description

TCustomTreeView overrides IsCustomDrawn to return True if an event handler is defined for OnCustomDrawItem, OnCustomDrawSubItem, or OnCustomDrawBranch.


TCustomTreeView.Loaded
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.SelectAll
 CLX Reference

TCustomTreeView.SelectAll

TCustomTreeView

Select or deselect all items

procedure SelectAll(Select: Boolean);

Description

If the MultiSelect property is True, SelectAll selects (Select is True) or deselects (Select is False) all items. If the MultiSelect property is False, only the item


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomViewControl

TCustomTreeView


TCustomViewItems
 CLX Reference

TCustomViewItems

Hierarchy	Properties	Methods

Item manager for TCustomViewControl.

Unit

QComCtrls

Description

TCustomViewItems manages and owns the TCustomViewItem objects that represent individual items in a TCustomViewControl.


 CLX Reference

TCustomViewItems Properties

TCustomViewItems	Alphabetically	Legend

In TCustomViewItems

Count

Item

Owner


 CLX Reference

TCustomViewItems Properties

TCustomViewItems	By Object	Legend

Count

Item

Owner


TCustomViewItems.Count
 CLX Reference

TCustomViewItems.Count

TCustomViewItems	See also 	Example

Returns the number of view items.

property Count: Integer;

Description

Count returns the number of items.


TCustomViewItems.Item
 CLX Reference

TCustomViewItems.Item

TCustomViewItems	See also

Lists all items managed by the TCustomViewItems object.

property Item[Index: Integer]: TCustomViewItem;

Description

Use Item to directly access a item, given its position in the view. The first item has an index of 0, the second an index of 1, and so on.


TCustomViewItems.Owner
 CLX Reference

TCustomViewItems.Owner

TCustomViewItems	See also

Indicates the custom view object that uses this object to manage its items.

property Owner: TCustomListView;

Description

Use Owner to access the list view object that uses this TCustomViewItems object to implement its Items property.


 CLX Reference

TCustomViewItems Methods

TCustomViewItems	Alphabetically	Legend

In TCustomViewItems

BeginUpdate

ChangeItemTypes

Clear

Create

Delete

Destroy

EndUpdate

IndexOf

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


 CLX Reference

TCustomViewItems Methods

TCustomViewItems	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ChangeItemTypes

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

IndexOf

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TCustomViewItems.BeginUpdate
 CLX Reference

TCustomViewItems.BeginUpdate

TCustomViewItems	See also

Prevents updating of the 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 items are added, deleted, or moved.

BeginUpdate/EndUpdate sequences can be nested. TCustomViewItems tracks the nesting level and delays screen updates until the outermost EndUpdate is called.


TCustomViewItems.ChangeItemTypes
 CLX Reference

TCustomViewItems.ChangeItemTypes

TCustomViewItems

Change all item types

procedure ChangeItemTypes(NewType: TListViewItemType);

Description

ChangeItemTypes sets the ItemType property of all items to NewType.


TCustomViewItems.Clear
 CLX Reference

TCustomViewItems.Clear

TCustomViewItems	See also

Removes all items from the view.

procedure Clear;

Description

Call Clear to empty the view of all items. Clear frees all memory associated with the items and updates the image of the view.


TCustomViewItems.Create
 CLX Reference

TCustomViewItems.Create

TCustomViewItems	See also

Creates an instance of TCustomViewItems.

constructor Create(AOwner: TCustomViewControl);

Description

Call Create to instantiate a TCustomViewItems object at runtime. The TCustomViewItems object used by TCustomViewControl to implement its Items property is created automatically by the view's constructor.


TCustomViewItems.DefineProperties
 CLX Reference

TCustomViewItems.DefineProperties

TCustomViewItems	See also

Provides an interface for a method that reads and writes otherwise unpublished data.

procedure DefineProperties(Filer: TFiler); override;

Description

TCustomViewItems overrides DefineProperties in order to persist individual items.


TCustomViewItems.Delete
 CLX Reference

TCustomViewItems.Delete

TCustomViewItems	See also

Deletes a specified item and updates the view.

procedure Delete(Index: Integer);

Description

The Delete method deletes the item specified with the Index parameter. The first item in the view has an index of 0, the second item has an index of 1, and so on.


TCustomViewItems.Destroy
 CLX Reference

TCustomViewItems.Destroy

TCustomViewItems	See also

Destroys an instance of TCustomViewItems.

destructor Destroy; override;

Description

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

Destroy frees the list before calling the inherited destructor.


TCustomViewItems.EndUpdate
 CLX Reference

TCustomViewItems.EndUpdate

TCustomViewItems	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.


TCustomViewItems.IndexOf
 CLX Reference

TCustomViewItems.IndexOf

TCustomViewItems	See also

Returns the position of a list item in the list view window.

function IndexOf(Value: TCustomViewItem): Integer;

Description

Call IndexOf to determine the position of the item specified by the Value parameter. IndexOf returns -1 if the item is not in the view.


Hierarchy

TObject

TPersistent

TCustomViewItems


TDragObject
 CLX Reference

TDragObject

Hierarchy	Properties	Methods	See also

TDragObject is a base class used for managing drag operations.

Unit

QControls

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.

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 shared object files as well as inside the main executable. This is useful if you are not using packages but still want drag operations to function from forms implemented in executables to forms implemented in shared object files.


 CLX Reference

TDragObject Properties

TDragObject	Alphabetically	Legend

In TDragObject

DragTargetPos

IsInterAppDrag

KeyState


 CLX Reference

TDragObject Properties

TDragObject	By Object	Legend

DragTargetPos

IsInterAppDrag

KeyState


TDragObject.DragTargetPos
 CLX 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.IsInterAppDrag
 CLX Reference

TDragObject.IsInterAppDrag

TDragObject

Drag between applications?

property IsInterAppDrag: Boolean;

Description

IsInterAppDrag returns True  if the drag operation involves a second program.


TDragObject.KeyState
 CLX Reference

TDragObject.KeyState

TDragObject

Indicates the state of the Ctrl, Shift, and Alt keys.

property KeyState: TShiftState;

Description

Read KeyState to determine the state of the Ctrl, Shift, and Alt keys.


 CLX Reference

TDragObject Methods

TDragObject	Alphabetically	Legend

In TDragObject

Assign

Create

Finished

GetDragImageHotSpot

GetDragImageIndex

HideDragImage

SetDragImage

ShowDragImage

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 CLX Reference

TDragObject Methods

TDragObject	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Finished

Free

FreeInstance

GetDragImageHotSpot

GetDragImageIndex

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetKeyState

HideDragImage

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SetDragImage

ShowDragImage


TDragObject.Assign
 CLX 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
 CLX 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.GetDragImageHotspot
 CLX Reference

TDragObject.GetDragImageHotspot

TDragObject	See also

Returns the drag image hotspot.

function GetDragImageHotSpot: TPoint; virtual;

Description

GetDragImageHotspot is called automatically when dragging begins to determine the drag image hotspot. The hotspot is the location of the drag image relative to the mouse pointer, and is specified as the cursor’s location in the image’s coordinate space.

As defined in TDragObject, GetDragImageHotspot returns Point(-1, -1), which places the drag image one pixel down and right from the cursor. Descendent classes can override GetDragImageHotspot to specify a different hotspot.


TDragObject.GetDragImageIndex
 CLX Reference

TDragObject.GetDragImageIndex

TDragObject	See also

Returns the drag image index.

function GetDragImageIndex: TDragImageList; virtual;

Description

GetDragImageIndex is called automatically to determine the drag image for the control. The value returned by GetDragImageIndex is an index into an internal TImageList. A reference to this object is returned by DragImageList. If GetDragImageIndex returns –1, DragImageList returns a default image.

As defined in TDragObject, GetDragImageIndex returns –1. Descendent classes override GetDragImageIndex to specify a different drag image.


TDragObject.GetKeyState
 CLX Reference

TDragObject.GetKeyState

TDragObject	See also

Returns the value of the KeyState property.

function GetKeyState: TShiftState; virtual;

Description

GetKeyState is the protected read implementation of the KeyState property. It returns the current status of the Shirt, Ctrl, and Alt keys.


TDragObject.HideDragImage
 CLX 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.SetDragImage
 CLX Reference

TDragObject.SetDragImage

TDragObject	See also

Assigns the image that the GetDragImageIndex method identifies to the underlying widget.

procedure SetDragImage;

Description

SetDragImage is used internally to apply the drag image to the underlying widget that implements the drag object. It calls the GetDragImageIndex method to identify the current drag image, and applies that image to the underlying widget.


TDragObject.ShowDragImage
 CLX 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.


TDragObject.Create
 CLX Reference

TDragObject.Create

TDragObject	See also

Creates a new TDragObject object.

constructor Create;

Description

Call Create to instantiate a new TDragObject instance from an OnStartDrag event handler.


TDragObject.Destroy
 CLX Reference

TDragObject.Destroy

TDragObject	See also

Frees the memory associated with the TDragObject object.

destructor Destroy; override;

Description

Do not call Destroy to free a TDragObject instance. Instead, use the Free method, which first checks for a nil reference before calling Destroy.


Hierarchy

TObject

TDragObject


TDrawGrid
 CLX Reference

 TDrawGrid

Hierarchy	Properties	Methods	Events	Using TDrawGrid	See also

TDrawGrid represents a grid control that displays information in column and row format.

Unit

QGrids

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.


 CLX Reference

TDrawGrid properties

TDrawGrid	Alphabetically	Legend

Derived from TCustomGrid

BorderStyle

ClientRect

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 TWidgetControl

Brush

ChildHandle

ClientOrigin

ControlCount

Controls

Enabled

Handle

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TDrawGrid properties

TDrawGrid	By object	Legend

Action

Align

Anchors

BorderStyle

BoundsRect

Brush

Canvas

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Col

ColCount

Color

ColWidths

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DefaultColWidth

DefaultDrawing

DefaultRowHeight

DesignInfo

DragMode

EditorMode

Enabled

FixedColor

FixedCols

FixedRows

Font

GridHeight

GridLineWidth

GridWidth

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

LeftCol

Name

Options

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

Row

RowCount

RowHeights

ScrollBars

Selection

ShowHint

Showing

TabOrder

TabStop

TabStops

Tag

Top

TopRow

Visible

VisibleColCount

VisibleRowCount

Width


 CLX Reference

TDrawGrid events

TDrawGrid	Alphabetically	Legend

In TDrawGrid

OnColumnMoved

OnDrawCell

OnGetEditMask

OnGetEditText

OnRowMoved

OnSelectCell

OnSetEditText

OnTopLeftChanged

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheelDown

OnMouseWheelUp

OnStartDrag


 CLX Reference

TDrawGrid events

TDrawGrid	By object	Legend

OnClick

OnColumnMoved

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDrawCell

OnEndDrag

OnEnter

OnExit

OnGetEditMask

OnGetEditText

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheelDown

OnMouseWheelUp

OnRowMoved

OnSelectCell

OnSetEditText

OnStartDrag

OnTopLeftChanged


TDrawGrid.OnColumnMoved
 CLX Reference

TDrawGrid.OnColumnMoved

TDrawGrid	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.


TDrawGrid.OnDrawCell
 CLX Reference

TDrawGrid.OnDrawCell

TDrawGrid	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.


TDrawGrid.OnGetEditMask
 CLX Reference

TDrawGrid.OnGetEditMask

TDrawGrid	See also 	Example

Occurs when the in-place editor requests an edit mask.

type TGetEditEvent = procedure (Sender: TObject; ACol, ARow: Longint; var Value: WideString) 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.


TDrawGrid.OnGetEditText
 CLX Reference

TDrawGrid.OnGetEditText

TDrawGrid	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: WideString) 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.


TDrawGrid.OnRowMoved
 CLX Reference

TDrawGrid.OnRowMoved

TDrawGrid	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.


TDrawGrid.OnSelectCell
 CLX Reference

TDrawGrid.::OnSelectCell

TDrawGrid	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.


TDrawGrid.OnSetEditText
 CLX Reference

TDrawGrid.OnSetEditText

TDrawGrid	See also

Occurs when the user edits the value of a cell.

type TSetEditEvent = procedure (Sender: TObject; ACol, ARow: Longint; const Value: WideString) 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.


TDrawGrid.OnTopLeftChanged
 CLX Reference

TDrawGrid.OnTopLeftChanged

TDrawGrid	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.


 CLX Reference

TDrawGrid methods

TDrawGrid	Alphabetically	Legend

In TDrawGrid

CellRect

ColumnMoved

DrawCell

GetEditMask

GetEditText

MouseToCell

RowMoved

SelectCell

SetEditText

TopLeftChanged

Derived from TCustomGrid

Create

Destroy

MouseCoord

Derived from TCustomControl

Invalidate

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TDrawGrid methods

TDrawGrid	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

DragDrop

Dragging

DrawCell

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetEditMask

GetEditText

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

MouseCoord

MouseToCell

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

RowMoved

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectCell

SendToBack

SetBounds

SetEditText

SetFocus

SetSubComponent

Show

TopLeftChanged

Update

UpdateAction

UpdateControlState


TDrawGrid.CellRect
 CLX Reference

TDrawGrid.CellRect

TDrawGrid	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.


TDrawGrid.ColumnMoved
 CLX Reference

TDrawGrid.ColumnMoved

TDrawGrid	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 theinherited method to generate an OnColumnMoved event. Descendants of TDrawGrid can override this method to make internal adjustments or to block the OnColumnMoved event.


TDrawGrid.DrawCell
 CLX Reference

TDrawGrid.DrawCell

TDrawGrid	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 TDrawGrid can override this method to draw the contents of the cell or to block the OnDrawCell event.


TDrawGrid.GetEditMask
 CLX Reference

TDrawGrid.GetEditMask

TDrawGrid	See also

Generates an OnGetEditMask event.

function GetEditMask(ACol, ARow: Longint): WideString; 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.


TDrawGrid.GetEditText
 CLX Reference

TDrawGrid.GetEditText

TDrawGrid	See also

Generates an OnGetEditText event.

function GetEditText(ACol, ARow: Longint): WideString; 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.


TDrawGrid.MouseToCell
 CLX Reference

TDrawGrid.MouseToCell

TDrawGrid	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.


TDrawGrid.RowMoved
 CLX Reference

TDrawGrid.RowMoved

TDrawGrid	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 TDrawGrid can override this method to make internal adjustments or to block the OnRowMoved event.


TDrawGrid.SelectCell
 CLX Reference

TDrawGrid.SelectCell

TDrawGrid	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 TDrawGrid can override this method to check the properties of the information displayed in the cell or block the OnSelectCell event.


TDrawGrid.SetEditText
 CLX Reference

TDrawGrid.SetEditText

TDrawGrid	See also

Generates an OnSetEditText event.

procedure SetEditText(ACol, ARow: Longint; const Value: WideString); 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 TDrawGrid can override this method to update an internal representation of the cell’s value, or to block the OnSetEditText event.


TDrawGrid.TopLeftChanged
 CLX Reference

TDrawGrid.TopLeftChanged

TDrawGrid	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

TWidgetControl

TCustomControl

TCustomGrid

TDrawGrid


TDrawing
 CLX Reference

TDrawing

Hierarchy	Properties	Methods	Events	See also

TDrawing represents a series of drawing commands that can be recorded and played back.

Unit

QGraphics

Description

Use TDrawing to record a series of drawing commands that can later be “played back” on another canvas.

To use TDrawing, first create a new TDrawing object, and draw the image on its canvas. When you have finished the drawing, you can “play” that drawing on another canvas by using the Draw or StretchDraw method of the canvas on which you want to “play” the drawing.

Use the SaveToMimeSource, SaveToFile, or SaveToStream method to save the recorded drawing instructions. These can be reloaded by another TDrawing object by calling its LoadFromMimeSource, LoadFromFile, or LoadFromStream method. Once you have loaded a drawing, you can further record additional drawing commands on the newly loaded drawing’s canvas.


 CLX Reference

TDrawing Properties

TDrawing	Alphabetically	Legend

In TDrawing

Canvas

Empty

Handle

Height

Width

Derived from TGraphic

Modified

Transparent


 CLX Reference

TDrawing Properties

TDrawing	By Object	Legend

Canvas

Empty

Handle

Height

Modified

Transparent

Width


TDrawing.Canvas
 CLX Reference

TDrawing.Canvas

TDrawing	See also

Provides access to a drawing surface on which to record the drawing.

property Canvas: TCanvas;

Description

Draw the image you want to record using the properties and methods of Canvas. When you have finished rendering the image this drawing represents, you can “play” it to another canvas object using the target canvas’s Draw or StretchDraw method.

You can preload Canvas with a set of drawing instructions saved from another TDrawing object by calling the LoadFromMimeSource, LoadFromFile, or LoadFromStream method. When you call any of these methods, the current set of instructions recorded on the drawing’s canvas are overwritten by the new set of instructions.

A canvas object is created automatically for the drawing and the property is read-only.


TDrawing.Empty
 CLX Reference

TDrawing.Empty

TDrawing	See also

Indicates whether the drawing has recorded an image.

property Empty: Boolean;

Description

Use Empty to determine if the TDrawing contains any recorded instructions for creating an image. When Empty is True, the TDrawing object has not recorded any drawing instructions, and attempting to “play” the drawing to another canvas will do nothing.


TDrawing.Handle
 CLX Reference

TDrawing.Handle

TDrawing

Provides access to the unique 4-byte identifier that represents the underlying QPicture object.

property Handle: QPictureH;

Description

The Handle property provides access to the unique 4-byte identifier that represents the instance of a Qt QPicture object.

Use Handle to obtain a typed pointer to the instance of the underlying QPicture object. This Handle can be used when making low-level function calls into the Qt shared libraries.


TDrawing.Height
 CLX Reference

TDrawing.Height

TDrawing	See also

Specifies the vertical size in pixels of the drawing’s image.

property Height: Integer;

Description

Use Height to get or set the height of the drawing’s image in pixels. The height of the drawing is saved with the drawing instructions, and determines the height of the image that can be “played” to another canvas.


TDrawing.Width
 CLX Reference

TDrawing.Width

TDrawing	See also

Specifies the width in pixels of the drawing’s image.

property Width: Integer;

Description

Use Width to get or set the width of the drawing’s image in pixels. The width of the drawing is saved with the drawing instructions, and determines the width of the image that can be “played” to another canvas.


 CLX Reference

TDrawing events

TDrawing	Alphabetically	Legend

Derived from TGraphic

OnChange

OnProgress


 CLX Reference

TDrawing events

TDrawing	By object	Legend

OnChange

OnProgress


 CLX Reference

TDrawing Methods

TDrawing	Alphabetically	Legend

In TDrawing

Assign

Create

Destroy

LoadFromMimeSource

LoadFromStream

SaveToMimeSource

SaveToStream

Derived from TGraphic

Assigns

AssignsTo

LoadFrom

LoadFromFile

SaveTo

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


 CLX Reference

TDrawing Methods

TDrawing	By Object	Legend

AfterConstruction

Assign

Assigns

AssignsTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LoadFrom

LoadFromFile

LoadFromMimeSource

LoadFromStream

MethodAddress

MethodName

NewInstance

SafeCallException

SaveTo

SaveToFile

SaveToMimeSource

SaveToStream


TDrawing.Assign
 CLX Reference

TDrawing.Assign

TDrawing	See also

Copies the drawing instructions from another TDrawing object.

procedure Assign(Source: TPersistent); override;

Description

If Source is another TDrawing object, Assign copies its dimensions and drawing instructions into this TDrawing object, replacing any instructions that were currently written to the canvas. If Source is not another TDrawing object, Assign calls the inherited method, which calls the AssignTo method of the Source object. This allows other objects to copy themselves to the TDrawing instance.


TDrawing.Create
 CLX Reference

TDrawing.Create

TDrawing

Instantiates a TDrawing object.

constructor Create; override;

Description

Call Create to instantiate a TDrawing object at runtime.


TDrawing.Destroy
 CLX Reference

TDrawing.Destroy

TDrawing	See also

Disposes of the instance of the TDrawing object.

destructor Destroy; override;

Description

Destroy is the destructor for a TDrawing 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.


TDrawing.LoadFromMimeSource
 CLX Reference

TDrawing.LoadFromMimeSource

TDrawing 	See also

Loads a series of drawing instructions from a TMimeSource object.

procedure LoadFromMimeSource(MimeSource: TMimeSource); override;

Description

LoadFromMimeSource loads the drawing instructions from a TMimeSource object, replacing any instructions currently stored on the TDrawing object’s canvas. If MimeSource can’t supply a series of drawing instructions, LoadFromMimeSource does nothing.

Note:	To save a set of drawing instructions to a mime source, use the SaveToMimeSource method of this or another TDrawing object.


TDrawing.LoadFromStream
 CLX Reference

TDrawing.LoadFromStream

TDrawing	See also

Loads the drawing instructions from a stream into the TDrawing object.

procedure LoadFromStream(Stream: TStream); override;

Description

LoadFromStream loads the drawing instructions from a stream, replacing any instructions currently stored on the TDrawing object’s canvas.

Note:	To save a set of drawing instructions to a stream, use the SaveToStream method of this or another TDrawing object.


TDrawing.SaveToMimeSource
 CLX Reference

TDrawing.SaveToMimeSource

TDrawing 	See also

Saves the drawing to a TClxMimeSource object.

procedure SaveToMimeSource(MimeSource: TClxMimeSource); override;

Description

SaveToMimeSource saves the height, width, and drawing instructions to a TClxMimeSource object using the format 'image/delphi.drawing'.


TDrawing.SaveToStream
 CLX Reference

TDrawing.SaveToStream

TDrawing 	See also

Saves the drawing instructions contained by this object to a stream.

procedure SaveToStream(Stream: TStream); override;

Description

Use SaveToStream to write the drawing instructions to the stream specified by the Stream parameter. Another TDrawing object (or this object at a later time) can then read those instructions back from the stream using the LoadFromStream method.


Hierarchy

TObject

TPersistent

TGraphic

TDrawing


EAccessViolation
 CLX 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.


 CLX Reference

EAccessViolation properties

EAccessViolation	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EAccessViolation properties

EAccessViolation	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


TEditCut
 CLX Reference

TEditCut

Hierarchy	Properties	Methods	Events	Using TEditCut	See also

TEditCut cuts the selected text in a target edit control to the clipboard.

Unit

QStdActns

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.


 CLX Reference

TEditCut properties

TEditCut	Alphabetically	Legend

Derived from TEditAction

EditControl

MemoControl

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TEditCut properties

TEditCut	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

EditControl

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

MemoControl

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TEditCut events

TEditCut	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TEditCut events

TEditCut	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX Reference

TEditCut.ExecuteTarget

TEditCut 	See also

Cuts selected text in the target control to the 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


EFCreateError
 CLX 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.


 CLX Reference

EFCreateError properties

EFCreateError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EFCreateError properties

EFCreateError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EFilerError
 CLX 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


 CLX Reference

EFilerError properties

EFilerError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EFilerError properties

EFilerError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EFOpenError
 CLX 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.


 CLX Reference

EFOpenError properties

EFOpenError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EFOpenError properties

EFOpenError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EHeaderException
 CLX Reference

EHeaderException

Hierarchy	Properties	Methods	See also

EHeaderException is the exception class for header controls.

Unit

QControls

Description

EHeaderException is raised when an error occurs using controls descended from TCustomHeader and TCustomHeaderException.


 CLX Reference

EHeaderException Properties

EHeaderException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EHeaderException Properties

EHeaderException	By Object	Legend

HelpContext

Message


 CLX Reference

EHeaderException Methods

EHeaderException	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


 CLX Reference

EHeaderException Methods

EHeaderException	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

EHeaderException


EIntOverflow
 CLX 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.


 CLX Reference

EIntOverflow properties

EIntOverflow	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EIntOverflow properties

EIntOverflow	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX 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.


 CLX Reference

EInvalidOp properties

EInvalidOp	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EInvalidOp properties

EInvalidOp	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EInvalidGraphicOperation
 CLX Reference

EInvalidGraphicOperation

Hierarchy	Properties	Methods	See also

EInvalidGraphicOperation is the exception class for illegal operations on graphics.

Unit

QGraphics

Description

EInvalidGraphicOperation is raisedwhen an illegal operation is attempted on a graphic. For example, an EInvalidGraphicOperation exception is raised when

An application attempts to paint to the canvas when it is not in a valid state (such as when the Font or Pen is invalid).

A handle could not be allocated for an operation.

An application attempts to access a scanline that does not exist in an image.

An application attempts to load an image format that is unknown or unsupported.

An application attempts to set the PixelFormat of an image to an unsupported value.

An application cannot successfully write an image.


 CLX Reference

EInvalidGraphicOperation properties

EInvalidGraphicOperation	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EInvalidGraphicOperation properties

EInvalidGraphicOperation	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EInvalidImage
 CLX Reference

EInvalidImage

Hierarchy	Properties	Methods	See also

EInvalidImage is the exception class for unsuccessful attempts to read image 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.


 CLX Reference

EInvalidImage properties

EInvalidImage	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EInvalidImage properties

EInvalidImage	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EInvalidOperation
 CLX 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.


 CLX Reference

EInvalidOperation properties

EInvalidOperation	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EInvalidOperation properties

EInvalidOperation	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EInvalidParam
 CLX Reference

EInvalidParam

Hierarchy	Properties	Methods	See also

EInvalidParam is the exception class for illegal stream operations on mime sources.

Unit

QTypes

Description

EInvalidParam is raised when an invalid stream handle is passed to the LoadFromStream or SaveToStream method of a mime source object such as TClxMimeSource or TMimeSource.


 CLX Reference

EInvalidParam Properties

EInvalidParam	By Object	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EInvalidParam Properties

EInvalidParam	By Object	Legend

HelpContext

Message


 CLX Reference

EInvalidParam methods

EInvalidParam	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


 CLX Reference

EInvalidParam methods

EInvalidParam	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

EInvalidParam


EInvalidPointer
 CLX 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.


 CLX Reference

EInvalidPointer properties

EInvalidPointer	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EInvalidPointer properties

EInvalidPointer	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EListColumnException
 CLX Reference

EListColumnException

Hierarchy	Properties	Methods

EListColumnException is the exception class for list columns.

Unit

QControls

Description

EListColumnException is raised when an error occurs in list columns.


 CLX Reference

EListColumnException Properties

EListColumnException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EListColumnException Properties

EListColumnException	By Object	Legend

HelpContext

Message


 CLX Reference

EListColumnException Methods

EListColumnException	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


 CLX Reference

EListColumnException Methods

EListColumnException	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

EListColumnException


EMenuError
 CLX Reference

EMenuError

Hierarchy	Properties	Methods	See also

EMenuError is the exception class for errors involving menu items.

Unit

QMenus

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

An application passes an object that is not a descendant of TCustomForm to the SetForm method of TMenu


 CLX Reference

EMenuError properties

EMenuError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EMenuError properties

EMenuError	By object	Legend

Message

HelpContext


 CLX 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


 CLX 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


EOSError
 CLX 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.


 CLX Reference

EOSError properties

EOSError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EOSError properties

EOSError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EOutOfMemory
 CLX 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.


 CLX Reference

EOutOfMemory properties

EOutOfMemory	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EOutOfMemory properties

EOutOfMemory	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EPackageError
 CLX 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.


 CLX Reference

EPackageError properties

EPackageError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EPackageError properties

EPackageError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX Reference

EPrinter

Hierarchy	Properties	Methods

EPrinter is the exception class for printing errors.

Unit

QPrinters

Description

EPrinter is raised when a printing error occurs. For example, if you attempt to start a print job when another job is currently printing, or if you attempt to abort a print job when no printing is underway, an EPrinter exception is raised.


 CLX Reference

EPrinter properties

EPrinter	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EPrinter properties

EPrinter	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX 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.


 CLX Reference

EPrivilege properties

EPrivilege	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EPrivilege properties

EPrivilege	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EPropertyConvertError
 CLX 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.


 CLX Reference

EPropertyConvertError properties

EPropertyConvertError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EPropertyConvertError properties

EPropertyConvertError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX 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.


 CLX Reference

EPropertyError properties

EPropertyError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EPropertyError properties

EPropertyError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EQtDialogException
 CLX Reference

EQtDialogException

Hierarchy	Properties	Methods	See also

EQtDialogException is the exception class for Qt dialogs.

Unit

QDialogs

Description

EQtDialogException is raised when a TQtDialog descendant fails to create the underlying widget the implements the dialog. The QtDialog descendants include TColorDialog, TFontDialog, TOpenDialog, and TSaveDialog.


 CLX Reference

EQtDialogException properties

EQtDialogException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EQtDialogException properties

EQtDialogException	By object	Legend

Message

HelpContext


 CLX Reference

EQtDialogException methods

EQtDialogException	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


 CLX Reference

EQtDialogException methods

EQtDialogException	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

EQtDialogException


EQuit
 CLX Reference

 EQuit

Hierarchy	Properties	Methods

EQuit is the exception class for SIGQUIT signals.

Unit

SysUtils

Description

EQuit is raised when a Linux application receives a SIGQUIT signal. This signal typically occurs when the application is run from the shell command line, and the user presses Ctrl-\.


 CLX Reference

EQuit properties

EQuit	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EQuit properties

EQuit	By object	Legend

HelpContext

Message


 CLX Reference

EQuit methods

EQuit	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


 CLX Reference

EQuit methods

EQuit	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

EQuit


ERegisterActionsException
 CLX Reference

ERegisterActionsException

Hierarchy	Properties	Methods	See also

ERegisterActionsException is the exception class for when the action registration system has not been initialized.

Unit

IniFiles

Description

ERegisterActionsException is raised when a call to one of the global routines that deal with registered actions fails because the action registration system has not been initialized. The routines that can raise ERegisterActionsException include

RegisterActions

UnRegisterActions

EnumRegisteredActions

CreateAction


 CLX Reference

ERegisterActionsException properties

ERegisterActionsException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

ERegisterActionsException properties

ERegisterActionsException	By object	Legend

HelpContext

Message


 CLX Reference

ERegisterActionsException methods

ERegisterActionsException	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


 CLX Reference

ERegisterActionsException methods

ERegisterActionsException	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

ERegisterActionsException


EResNotFound
 CLX 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 .xfm or resource 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 *.xfm} compiler directive. If this directive is missing or commented out, the .xfm file will not be included in the executable and an EResNotFound exception will be generated.


 CLX Reference

EResNotFound properties

EResNotFound	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EResNotFound properties

EResNotFound	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


ERangeException
 CLX Reference

ERangeException

Hierarchy	Properties	Methods	See also

ERangeException is the exception class for range errors in graduated controls.

Unit

QControls

Description

ERangeException is raised when a range error occurs in a graduated control, such as TProgressBar or TTrackBar. Do not confuse ERangeException with ERangeError, which is an integer math error.


 CLX Reference

ERangeException Properties

ERangeException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

ERangeException Properties

ERangeException	By Object	Legend

HelpContext

Message


 CLX Reference

ERangeException Methods

ERangeException	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


 CLX Reference

ERangeException Methods

ERangeException	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

ERangeException


EStringListError
 CLX 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.


 CLX Reference

EStringListError properties

EStringListError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EStringListError properties

EStringListError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EThread
 CLX 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.


 CLX Reference

EThread properties

EThread	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EThread properties

EThread	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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
 CLX Reference

ETreeViewError

Hierarchy	Properties	Methods	See also

ETreeViewError is the exception class for tree view errors.

Unit

QComCtrls

Description

ETreeViewError is raised when an error is made in a TCustomTreeView or TTreeNode object.


 CLX Reference

ETreeViewError properties

ETreeViewError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

ETreeViewError properties

ETreeViewError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


EWriteError
 CLX 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.


 CLX Reference

EWriteError properties

EWriteError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 CLX Reference

EWriteError properties

EWriteError	By object	Legend

HelpContext

Message


 CLX 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


 CLX 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


TFiler
 CLX 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 .xfm 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.


 CLX Reference

TFiler properties

TFiler	Alphabetically	Legend

In TFiler

Ancestor

IgnoreChildren

LookupRoot

Root


 CLX Reference

TFiler properties

TFiler	By object	Legend

Ancestor

IgnoreChildren

LookupRoot

Root


TFiler.Ancestor
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TFileStream properties

TFileStream	Alphabetically	Legend

Derived from THandleStream

Handle

Derived from TStream

Position

Size


 CLX Reference

TFileStream properties

TFileStream	By object	Legend

Handle

Position

Size


 CLX 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


 CLX 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
 CLX 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
 CLX 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


TFindDialog
 CLX Reference

 TFindDialog

Hierarchy	Properties	Methods	Events	See also

TFindDialog displays a Find dialog that allows users to search for text in a file.

Unit

QDialogs

Description

The TFindDialog component displays a modeless  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.


 CLX Reference

TFindDialog properties

TFindDialog	Alphabetically	Legend

In TFindDialog

FindText

Options

Derived from TDialog

HelpContext

HelpKeyword

HelpType

Position

Title

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TFindDialog properties

TFindDialog	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

FindText

HelpContext

HelpKeyword

HelpType

Name

Options

Owner

Position

Tag

Title


TFindDialog.FindText
 CLX Reference

TFindDialog.FindText

TFindDialog

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.Options
 CLX 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
 CLX Reference

TFindDialog.Position

TFindDialog	See also

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.


 CLX Reference

TFindDialog events

TFindDialog	Alphabetically	Legend

In TFindDialog

OnFind

Derived from TDialog

OnClose

OnShow


 CLX Reference

TFindDialog events

TFindDialog	By object	Legend

OnClose

OnFind

OnShow


TFindDialog.OnFind
 CLX Reference

TFindDialog.OnFind

TFindDialog	See also

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.


 CLX Reference

TFindDialog methods

TFindDialog	Alphabetically	Legend

In TFindDialog

Create

Derived from TCustomDialog

Execute

InvokeHelp

Derived from TComponent

BeforeDestruction

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

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


 CLX Reference

TFindDialog methods

TFindDialog	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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TFindDialog.CloseDialog
 CLX 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
 CLX 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.

Sets the Modal property to include False.


Hierarchy

TObject

TPersistent

TComponent

TDialog

TCustomDialog

TFindDialog


TFrame
 CLX 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

QForms

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.


 CLX Reference

TFrame properties

TFrame	Alphabetically	Legend

Derived from TScrollingWidget

AutoScroll

ChildHandle

ClientOrigin

ClientRect

Handle

HorzScrollBar

VertScrollBar

Derived from TWidgetControl

Brush

ControlCount

Controls

Enabled

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TFrameControl

BorderStyle

Derived from TCustomFrame

Parent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TFrame properties

TFrame	By object	Legend

Action

Align

Anchors

AutoScroll

BorderStyle

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HorzScrollBar

Left

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

Top

VertScrollBar

Visible

Width


 CLX Reference

TFrame events

TFrame	Alphabetically	Legend

Derived from TWidgetControl

OnEnter

OnExit

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize

OnStartDrag


 CLX Reference

TFrame events

TFrame	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize

OnStartDrag


 CLX Reference

TFrame methods

TFrame	Alphabetically	Legend

In TCustomFrame

Create

In TFrameControl

ContentsRect

Derived from TScrollingWidget

Destroy

DisableAutoRange

EnableAutoRange

ScrollBy

ScrollInView

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TFrame methods

TFrame	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

DragDrop

Dragging

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendToBack

SetBounds

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TScrollingWidget

TCustomFrame

TFrame


TGraphic
 CLX 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

QGraphics

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.


 CLX Reference

TGraphic properties

TGraphic	Alphabetically	Legend

In TGraphic

Empty

Height

Modified

Transparent

Width


 CLX Reference

TGraphic properties

TGraphic	By object	Legend

Empty

Height

Modified

Transparent

Width


TGraphic.Empty
 CLX 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
 CLX 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
 CLX 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, 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.Transparent
 CLX 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  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
 CLX 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.


 CLX Reference

TGraphic events

TGraphic	Alphabetically	Legend

In TGraphic

OnChange

OnProgress


 CLX Reference

TGraphic events

TGraphic	By object	Legend

OnChange

OnProgress


TGraphic.OnChange
 CLX 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
 CLX 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.


 CLX Reference

TGraphic methods

TGraphic	Alphabetically	Legend

In TGraphic

Assigns

AssignsTo

LoadFrom

LoadFromFile

LoadFromMimeSource

LoadFromStream

SaveTo

SaveToFile

SaveToMimeSource

SaveToStream

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


 CLX Reference

TGraphic methods

TGraphic	By object	Legend

AfterConstruction

Assign

Assigns

AssignsTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LoadFrom

LoadFromFile

LoadFromMimeSource

LoadFromStream

MethodAddress

MethodName

NewInstance

SafeCallException

SaveTo

SaveToFile

SaveToMimeSource

SaveToStream


TGraphic.Assigns
 CLX Reference

TGraphic.Assigns

TGraphic 	See also

Indicates whether the graphic can have its value assigned from a specified graphics class.

class function Assigns(Source: TGraphicClass): Boolean; virtual;

Description

Call Assigns to determine whether this graphic class is compatible with the image in another, specified graphic class.

Source is the class to assign to this graphic object.

Assigns returns True if Source can be assigned to this object or class, False otherwise.


TGraphic.AssignsTo
 CLX Reference

TGraphic.AssignsTo

TGraphic 	See also

Indicates whether the graphic can be assigned to a specified graphics class.

class function AssignsTo(Dest: TGraphicClass): Boolean; virtual;

Description

Call AssignsTo to determine whether this graphic class is compatible with the image in another, specified graphic class.

Dest is the class to which you want to assign this graphic object.

AssignsTo returns True if this graphic object can be assigned to the specified class, False otherwise.


TGraphic.LoadFrom
 CLX Reference

TGraphic.LoadFrom

TGraphic 	See also

Loads a stored graphic image.

procedure LoadFrom(const Filename: string); overload;

procedure LoadFrom(Stream: TStream); overload;

Description

LoadFrom provides an overloaded method that calls the appropriate method, either LoadFromFile or LoadFromStream, depending on the type of parameter that is passed to it.


TGraphic.LoadFromFile
 CLX Reference

TGraphic.LoadFromFile

TGraphic 	See also

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.LoadFromMimeSource
 CLX Reference

TGraphic.LoadFromMimeSource

TGraphic 	See also

Introduces an abstract method that loads the image from a TClxMimeSource object.

procedure LoadFromMimeSource(MimeSource: TClxMimeSource); virtual; abstract;

Description

Each descendant graphic object defines a LoadFromMimeSource method that loads a graphics object from  a TClxMimeSource object.


TGraphic.LoadFromStream
 CLX 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.SaveTo
 CLX Reference

TGraphic.SaveTo

TGraphic 	See also

Saves a graphic image.

procedure SaveTo(const Filename: string); overload;

procedure SaveTo(Stream: TStream); overload;

Description

SaveTo provides an overloaded method that calls the appropriate method, either SaveToFile or SaveToStream, depending on the type of parameter that is passed to it.


TGraphic.SaveToFile
 CLX Reference

TGraphic.SaveToFile

TGraphic

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.SaveToMimeSource
 CLX Reference

TGraphic.SaveToMimeSource

TGraphic 	See also

Introduces an abstract method that saves the image to a TClxMimeSource object.

procedure SaveToMimeSource(MimeSource: TClxMimeSource); virtual; abstract;

Description

Each descendant graphic object defines a SaveToMimeSource method that saves a graphics object to a TClxMimeSource object.


TGraphic.SaveToStream
 CLX 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

TGraphic


TGraphicsObject
 CLX Reference

TGraphicsObject

Hierarchy	Methods	Events	See also

TGraphicsObject is the abstract base class for objects which encapsulate a graphics object: TBrush, TFont, and TPen.

Unit

QGraphics

Description

Create descendants of TGraphicsObject when drawing an image to a canvas (TCanvas). Each TGraphicsObject object describes a graphics object that is selected into the painter associated with the canvas.

TGraphicsObject introduces a mechanism for responding to changes in the properties of the graphics object.


 CLX Reference

TGraphicsObject events

TGraphicsObject	Alphabetically	Legend

In TGraphicsObject

OnChange


 CLX Reference

TGraphicsObject events

TGraphicsObject	By object	Legend

OnChange


TGraphicsObject.OnChange
 CLX 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.


 CLX Reference

TGraphicsObject methods

TGraphicsObject	Alphabetically	Legend

In TGraphicsObject

Changed

DisableChanged

EnableChanged

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


 CLX Reference

TGraphicsObject methods

TGraphicsObject	By object	Legend

AfterConstruction

Assign

BeforeDestruction

Changed

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DisableChanged

Dispatch

EnableChanged

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

Lock

MethodAddress

MethodName

NewInstance

SafeCallException

Unlock


TGraphicsObject.Changed
 CLX 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.DisableChanged
 CLX Reference

TGraphicsObject.DisableChanged

TGraphicsObject	See also

Disables the generation of an OnChange event.

procedure DisableChanged;

Description

Call DisableChanged to temporarily prevent an OnChange event form occurring when making changes to the properties of a control. Each call to DisableChanged must be followed by a corresponding call to EnableChanged.

DiableChanged increments a reference count that EnableChanged later decrements and also sets a boolean flag that denotes that a change is pending.

Be sure to pair each call to DisableChanged with a call to EnableChanged. If an exception could be raised after the call to DisableChanged, use a try...finally statement to ensure that EnableChanged is called.


TGraphicsObject.EnableChanged
 CLX Reference

TGraphicsObject.EnableChanged

TGraphicsObject	See also

Decrements the reference count incremented by DisableChanged and calls the Changed method to generate an OnChange event if the reference count is zero and there are any pending changes.

procedure EnableChanged;

Description

Call EnableChanged to generate an OnChange event for pending changes that occurred after the call to DisableChanged.

DiableChanged increments a reference count that EnableChanged later decrements and also sets a boolean flag that denotes that a change is pending.

Be sure to pair each call to DisableChanged with a call to EnableChanged. If an exception could be raised after the call to DisableChanged, use a try...finally statement to ensure that EnableChanged is called.


TGraphicsObject.Lock
 CLX 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.


TGraphicsObject.Unlock
 CLX 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


TGridScrollBar
 CLX Reference

TGridScrollBar

Hierarchy	Properties	Methods	Events	See also

TGridScrollBar represents a scroll bar in a grid.

Unit

QGrids

Description

Grid controls use TGridScrollBar to represent the scroll bars that appear when the number of rows or columns can’t all fit within the boundaries of the grid. Applications do not create or use TGridScrollBar controls. They are created by the grid controls and not exposed in any public properties and methods. Component writers can use the properties and methods of TGridScrollBar, however, to interact with the scroll bars when writing custom grid controls.


 CLX Reference

TGridScrollBar properties

TGridScrollBar	Alphabetically	Legend

In TGridScrollBar

Visible

Derived from TScrollBar

Handle

Kind

LargeChange

Max

Min

Position

SmallChange

Track

Derived from TWidgetControl

Bitmap

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

Left

ParentColor

ParentShowHint

PopupMenu

ShowHint

Top

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TGridScrollBar properties

TGridScrollBar	By object	Legend

Action

Align

Anchors

Bitmap

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Handle

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

Kind

LargeChange

Left

Max

Min

Name

Owner

Parent

ParentColor

ParentShowHint

ParentWidget

PopupMenu

Position

ShowHint

Showing

SmallChange

TabOrder

TabStop

Tag

Top

Track

Visible

Width


TGridScrollBar.Visible
 CLX Reference

TGridScrollBar.Visible

TGridScrollBar	See also

Determines whether the scroll bar is currently visible in the grid.

property Visible: Boolean;

Description

Set Visible indicate whether the scroll bar should appear in its grid. Typically, grids set this property based on the value of the ScrollBars property and on whether all of the rows or columns can be displayed within the boundaries of the grid.


 CLX Reference

TGridScrollBar events

TGridScrollBar	Alphabetically	Legend

Derived from TScrollBar

OnChange

OnScroll

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnStartDrag


 CLX Reference

TGridScrollBar events

TGridScrollBar	By object	Legend

OnChange

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnScroll

OnStartDrag


 CLX Reference

TGridScrollBar methods

TGridScrollBar	Alphabetically	Legend

In TGridScrollBar

CanFocus

Create

Derived from TScrollBar

SetParams

Derived from TWidgetControl

Broadcast

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

ExecuteAction

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


 CLX Reference

TGridScrollBar methods

TGridScrollBar	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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetParams

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TGridScrollBar.Create
 CLX Reference

TGridScrollBar.Create

TGridScrollBar	See also

Creates and initializes an instance of TGridScrollBar.

constructor Create(AOwner: TComponent); override;

Description

Do not create instances of TGridScrollBar. The grids that use these scroll bars handle the instantiation and freeing of TGridScrollBar objects.

AOwner specifies the grid that uses the scroll bar. It must be a descendant of TCustomGrid.


TGridScrollBar.CanFocus
 CLX Reference

TGridScrollBar.CanFocus

TGridScrollBar	See also

Indicates whether the scroll bar can receive input focus.

function CanFocus: Boolean); override;

Description

TGridScrollBar overrides the CanFocus method that is introduced by TWidgetControl to always return False. This means that grid scroll bars never receive input focus. Rather, processing of keyboard input is handled by the grid control.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TScrollBar

TGridScrollBar


THeaderControl
 CLX Reference

 THeaderControl

Hierarchy	Properties	Methods	Events	See also

THeaderControl is a container for THeaderSection objects. It provides a set of resizable column headers.

Unit

QComCtrls

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.


 CLX Reference

THeaderControl Properties

THeaderControl	Alphabetically	Legend

In THeaderControl

Sections

Derived from TCustomHeaderControl

Canvas

Clickable

DragReorder

Images

Orientation

Resizable

Tracking

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DragMode

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

THeaderControl Properties

THeaderControl	By Object	Legend

Action

Align

Anchors

BoundsRect

Brush

Canvas

ChildHandle

Clickable

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

DragReorder

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Images

Left

Name

Orientation

Owner

Parent

ParentShowHint

ParentWidget

PopupMenu

Resizable

Sections

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Tracking

Visible

Width


THeaderControl.Sections
 CLX Reference

THeaderControl.Sections

THeaderControl	See also

Lists the header sections (column headings).

property Sections: THeaderSections;

Description

The Sections property holds a THeaderSections—that is, a collection of THeaderSection objects. At design time, header sections can be added, removed, or modified with the Sections editor. To open the Sections editor, select the Sections property in the Object Inspector, then double-click in the Value column to the right or click the ellipsis (...) button.


 CLX Reference

THeaderControl Events

THeaderControl	Alphabetically	Legend

Derived from TCustomHeaderControl

OnSectionClick

OnSectionMoved

OnSectionResize

Derived from TControl

OnConstrainedResize

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDrag


 CLX Reference

THeaderControl Events

THeaderControl	By Object	Legend

OnConstrainedResize

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnSectionClick

OnSectionMoved

OnSectionResize

OnStartDrag


 CLX Reference

THeaderControl Methods

THeaderControl	Alphabetically	Legend

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX 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

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


THeaderControl.Create
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

THeaderControl


THeaderSection
 CLX Reference

THeaderSection

Hierarchy	Properties	Methods	See also

THeaderSection represents a section of a header control.

Unit

QComCtrls

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.THeaderSection implements the generic behavior introduced in TCustomHeaderSection, and also helps THeaderControl coordinate with the underlying QHeader widget.


 CLX Reference

THeaderSection Properties

THeaderSection	Alphabetically	Legend

In THeaderSection

Text

Derived from TCustomHeaderSection

AllowClick

AllowResize

AutoSize

DisplayName

ImageIndex

Left

MaxWidth

MinWidth

Right

Width

Derived from TCollectionItem

Collection

ID

Index


 CLX Reference

THeaderSection Properties

THeaderSection	By Object	Legend

AllowClick

AllowResize

AutoSize

Collection

DisplayName

ID

ImageIndex

Index

Left

MaxWidth

MinWidth

Right

Text

Width


THeaderSection.Text
 CLX 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.


 CLX Reference

THeaderSection Methods

THeaderSections	Alphabetically	Legend

In THeaderSection

AssignTo

Derived from TCustomHeaderSection

Create

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


 CLX Reference

THeaderSection Methods

THeaderSection	By Object	Legend

AfterConstruction

Assign

AssignTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


THeaderSection.AssignTo
 CLX Reference

THeaderSection.::AssignTo

THeaderSection	See also

Specialized AssignTo.

procedure AssignTo(Dest: TPersistent); override;

Description

THeaderSection overrides AssignTo in order to add the Text property to the assignment.


THeaderSection.Destroy
 CLX Reference

THeaderSection.Destroy

THeaderSection	See also

Frees the memory associated with the THeaderSection object.

destructor Destroy; override;

Description

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


THeaderSection.SetWidthVal
 CLX Reference

THeaderSection.::SetWidthVal

THeaderSection 	See Also

Respond to change in Width.

procedure SetWidthVal(const Value: Integer); virtual;

Description

THeaderSection overrides SetWidthVal in order to update the corresponding label on the header control's underlying QHeader object.


Hierarchy

TObject

TPersistent

TCollectionItem

TCustomHeaderSection

THeaderSection


THelpContents
 CLX Reference

THelpContents

Hierarchy	Properties	Methods	Events	Using THelpContents	See also

THelpContents brings up the contents for the default help system.

Unit

QStdActns

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.


 CLX Reference

THelpContents properties

THelpContents	Alphabetically	Legend

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

THelpContents properties

THelpContents	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

THelpContents events

THelpContents	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

THelpContents events

THelpContents	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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


THelpTopicSearch
 CLX Reference

THelpTopicSearch

Hierarchy	Properties	Methods	Events	Using THelpTopicSearch	See also

THelpTopicSearch brings up the help index.

Unit

QStdActns

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.


 CLX Reference

THelpTopicSearch properties

THelpTopicSearch	Alphabetically	Legend

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

THelpTopicSearch properties

THelpTopicSearch	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

THelpTopicSearch events

THelpTopicSearch	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

THelpTopicSearch events

THelpTopicSearch	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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

QStdActns

Description

Do not use THintAction in an 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;


 CLX Reference

THintAction properties

THintAction	Alphabetically	Legend

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

THintAction properties

THintAction	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

THintAction events

THintAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

THintAction events

THintAction	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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


TIcon
 CLX Reference

TIcon

Hierarchy	Properties	Methods	Events	See also

TIcon is an encapsulation of a .ico file image.

Unit

QGraphics

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 .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.


 CLX Reference

TIcon properties

TIcon	Alphabetically	Legend

In TIcon

Empty

Handle

Height

Transparent

Width

Derived from TGraphic

Modified


 CLX Reference

TIcon properties

TIcon	By object	Legend

Empty

Handle

Height

Modified

Transparent

Width


TIcon.Empty
 CLX 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
 CLX Reference

TIcon.Handle

TIcon	See also

Provides access to the Qt pixmap handle.

property Handle: QPixmapH;

Description

Use Handle to specify the icon when using a Qt API function that requires the handle of the icon’s pixmap. The Handle property is nil if the icon has not been loaded.


TIcon.Height
 CLX 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.


TIcon.Transparent
 CLX 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
 CLX 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.


 CLX Reference

TIcon events

TIcon	Alphabetically	Legend

Derived from TGraphic

OnChange

OnProgress


 CLX Reference

TIcon events

TIcon	By object	Legend

OnChange

OnProgress


 CLX Reference

TIcon methods

TIcon	Alphabetically	Legend

In TIcon

Assign

AssignsTo

Create

Destroy

LoadFromMimeSource

LoadFromResourceName

LoadFromStream

SaveToMimeSource

SaveToStream

Derived from TGraphic

Assigns

LoadFrom

LoadFromFile

SaveTo

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


 CLX Reference

TIcon methods

TIcon	By object	Legend

AfterConstruction

Assign

Assigns

AssignsTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LoadFrom

LoadFromFile

LoadFromMimeSource

LoadFromResourceName

LoadFromStream

MethodAddress

MethodName

NewInstance

SafeCallException

SaveTo

SaveToFile

SaveToMimeSource

SaveToStream


TIcon.Assign
 CLX 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.AssignsTo
 CLX Reference

TIcon.AssignsTo

TIcon 	See also

Indicates whether the icon can be assigned to a specified graphics class.

class function AssignsTo(Dest: TGraphicClass): Boolean; override;

Description

Call AssignsTo to determine whether this icon is compatible with the image in another, specified graphic class.

Dest is the class to which you want to assign this icon.

AssignsTo returns True if this icon can be assigned to the specified class, False otherwise.


TIcon.Create
 CLX 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
 CLX 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.


TIcon.LoadFromMimeSource
 CLX Reference

TIcon.LoadFromMimeSource

TIcon 	See also

Loads the icon from a TClxMimeSource object.

procedure LoadFromMimeSource(MimeSource: TClxMimeSource); override;

Description

LoadFromMimeSource loads the icon image from a TClxMimeSource object. If the TClxMimeSource object can’t supply an icon image, LoadFromMimeSource does nothing.


TIcon.LoadFromResourceName
 CLX Reference

TIcon.LoadFromResourceName

TIcon	See also

Loads an icon resource into the icon object.

procedure LoadFromResourceName(Instance: Cardinal; const ResName: string);

Description

LoadFromResourceName loads the specified icon resource 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.


TIcon.LoadFromStream
 CLX 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.


TIcon.SaveToMimeSource
 CLX Reference

TIcon.SaveToMimeSource

TIcon 	See also

Saves the icon to a TClxMimeSource object.

procedure SaveToMimeSource(MimeSource: TClxMimeSource); override;

Description

SaveToMimeSource saves the icon’s image to a TClxMimeSource object.


TIcon.SaveToStream
 CLX 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.


Hierarchy

TObject

TPersistent

TGraphic

TIcon


TIconView
 CLX Reference

TIconView

Hierarchy	Properties	See also

Basic implementation of an icon view.

Unit

QComCtrls

Description

Use TListView to manage and display a collection of items displayed as icons.

TIconView publishes many of the properties, events, and methods of TCustomIconView, but does not introduce any new behavior.


 CLX Reference

TIconView Properties

TIconView	Alphabetically	Legend

Derived from TCustomIconView

Handle

IconOptions

Images

Items

ItemsMovable

MultiSelect

ResizeMode

SelCount

Selected

ShowToolTips

Sort

SortDirection

Spacing

TextPosition

Derived from TFrameControl

BorderStyle

ClientOrigin

Derived from TWidgetControl

Brush

ChildHandle

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TIconView Properties

TIconView	By Object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Handle

IconOptions

Images

Items

ItemsMovable

MultiSelect

ResizeMode

SelCount

Selected

ShowToolTips

Sort

SortDirection

Spacing

TextPosition

BorderStyle

ClientOrigin

Brush

ChildHandle

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop


 CLX Reference

TIconView Events

TIconView	Alphabetically	Legend

Derived from TCustomIconView

OnEdited

OnItemClicked

OnItemDoubleClick

OnItemEnter

OnItemExitViewportEnter

OnSelectItem

Derived from TWidgetControl

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TIconView Events

TIconView	By Object	Legend

OnContextPopup

OnDragDrop

OnDragOver

OnEdited

OnEndDrag

OnItemClicked

OnItemDoubleClick

OnItemEnter

OnItemExitViewportEnter

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnSelectItem

OnStartDrag


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomIconView

TIconView


IInterfaceList
 CLX 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.


 CLX Reference

IInterfaceList properties

IInterfaceList	Alphabetically	Legend

In IInterfaceList

Capacity

Count

Items


 CLX Reference

IInterfaceList properties

IInterfaceList	By object	Legend

Capacity

Count

Items


IInterfaceList.Capacity
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX Reference

IInterfaceList.Clear

IInterfaceList	See also

Clears the interface list.

procedure Clear;

Description

Call Clear to remove all interfaces from the list.


IInterfaceList.Delete
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TImage
 CLX Reference

 TImage

Hierarchy	Properties	Methods	Events	Using TImage	See also

TImage displays a graphical image.

Unit

QExtCtrls

Description

Use TImage to display a graphical image on a form. Use the TPicture object in the Picture property to specify the actual bitmap, drawing, 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.


 CLX Reference

TImage properties

TImage	Alphabetically	Legend

In TImage

AutoSize

Canvas

Center

IncrementalDisplay

Picture

Stretch

Transparent

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DragMode

Enabled

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Parent

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TImage properties

TImage	By object	Legend

Action

Align

Anchors

AutoSize

BoundsRect

Canvas

Center

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Height

HelpContext

HelpKeyword

HelpType

Hint

IncrementalDisplay

Left

Name

Owner

Parent

ParentShowHint

Picture

PopupMenu

ShowHint

Stretch

Tag

Top

Transparent

Visible

Width


TImage.AutoSize
 CLX Reference

TImage.AutoSize

TImage	See also

Specifies whether the control sizes itself automatically to accommodate the dimensions of the image.

property AutoSize: Boolean;

Description

Use AutoSize to specify whether the TImage control adjusts its own dimensions to match the dimensions of the image that the Picture property specifies. When AutoSize is True, the TImage control forces its own height and width to match those of the picture it represents. When AutoSize is False, the Center and Stretch properties determine how the image control deals with discrepancies between the size of the picture and the size of the image control.

By default, AutoSize is False.


TImage.Canvas
 CLX Reference

TImage.Canvas

TImage	See also 	Example

Provides a drawing surface for embellishing  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
 CLX 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.


TImage.IncrementalDisplay
 CLX 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
 CLX Reference

TImage.Picture

TImage	See also

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, drawing, 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.Stretch
 CLX 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 control to the image rather than resizing the image to the control, use the AutoSize property instead.

The default value for Stretch is False.


TImage.Transparent
 CLX 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.


 CLX Reference

TImage events

TImage	Alphabetically	Legend

In TImage

OnProgress

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TImage events

TImage	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnProgress

OnStartDrag


TImage.OnProgress
 CLX 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: WideString) 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.


 CLX Reference

TImage methods

TImage	Alphabetically	Legend

In TImage

Create

Destroy

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

Invalidate

ParentToClient

Refresh

Repaint

ScreenToClient

SendToBack

SetBounds

Show

Update

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX 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

DragDrop

Dragging

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

Show

Update

UpdateAction


TImage.Create
 CLX 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
 CLX 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


TInterfacedObject
 CLX Reference

TInterfacedObject

Hierarchy	Properties	Methods

TInterfacedObject implements the IInterface interface and can be used as a base for simple classes that benefit from having the IInterface methods implemented.

Unit

System

Description

TInterfacedObject is a base class for classes that support interfaces.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 object to a variable declared as a base class type will generate a compile-time error if that base class does not implement IInterface.

There is no class factory for TInterfacedObject.

Implemented methods of IInterface

QueryInterface, AddRef, and Release.


 CLX Reference

TInterfacedObject properties

TInterfacedObject	Alphabetically	Legend

In TInterfacedObject

RefCount


 CLX Reference

TInterfacedObject properties

TInterfacedObject	By object	Legend

RefCount


TInterfacedObject.RefCount
 CLX 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.


 CLX 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


 CLX 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
 CLX 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 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TInvokeableVariantType

Hierarchy	Properties	Methods	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.

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.


 CLX Reference

TInvokeableVariantType properties

TInvokeableVariantType	Alphabetically	Legend

Derived from TCustomVariantType

VarType


 CLX Reference

TInvokeableVariantType properties

TInvokeableVariantType	By object	Legend

VarType


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TIconViewItem
 CLX Reference

TIconViewItem

Hierarchy	Properties	Methods	See also

TIconViewItem is an individual item an icon view.

Unit

QComCtrls

Description

Use TIconViewItem to specify the appearance and data associations of an item in an view. All the items in the view are managed by a TIconViewItems object assigned to the Items property of the view control.


 CLX Reference

TIconViewItem Properties

TIconViewItem	Alphabetically	Legend

In TIconViewItem

AllowRename

Caption

Height

IconView

ImageIndex

Index

Left

Selectable

Selected

States

Top

Width


 CLX Reference

TIconViewItem Properties

TIconViewItem	By Object	Legend

AllowRename

Caption

Height

IconView

ImageIndex

Index

Left

Selectable

Selected

States

Top

Width


TIconViewItem.AllowRename
 CLX Reference

TIconViewItem.AllowRename

TIconViewItem	See also

Indicates whether the list item has input focus.

property AllowRename: Boolean;

Description

Set AllowRename to False to prevent the user from editing icon captions.


TIconViewItem.Caption
 CLX Reference

TIconViewItem.Caption

TIconViewItem	See also

Specifies the text that labels the icon.

property Caption: string;

Description

Use Caption to name the icon item.


TIconViewItem.Height
 CLX Reference

TIconViewItem.Height

TIconViewItem 	See also

Returns item height.

property Height: Integer;

Description

Height returns the height, in pixels, of the item.


TIconViewItem.IconView
 CLX Reference

TIconViewItem.IconView

TIconViewItem

Returns the item's icon view.

property IconView: TCustomIconView;

Description

Read IconView to access the icon view object that displays the item. Note that the icon view is not the item's owner. Items are owned by a TIconViewItems object, referenced by the view's Items property.


TIconViewItem.ImageIndex
 CLX Reference

TIconViewItem.ImageIndex

TIconViewItem

Determines which image is displayed as the item icon.

property ImageIndex: TImageIndex;

Description

Set ImageIndex to assign the item icon from the contents of the view's Images object.


TIconViewItem.Index
 CLX Reference

TIconViewItem.Index

TIconViewItem	See also 	Example

Indicates the index of the item in the TIconViewItems collection.

property Index: Integer;

Description

Index returns the same value used to retrieve the item from the Images object.


TIconViewItem.Left
 CLX Reference

TIconViewItem.Left

TIconViewItem	See also

Specifies the distance, in pixels, from the left edge of the view to the left edge of the item.

property Left: Integer;

Description

Left returns the horizontal position of the item.


TIconViewItem.Selectable
 CLX Reference

TIconViewItem.Selectable

TIconViewItem	See also

Indicates whether the item is selectable.

property Selectable: Boolean;

Description

Set Selectable to False to prevent the item from being selected. If the item was selected before Selectable was set to False, it will remain selected until the selection is removed in the usual way. The item can still receive the focus and be edited by the user.


TIconViewItem.Selected
 CLX Reference

TIconViewItem.Selected

TIconViewItem	See also

Indicates whether the item is selected.

property Selected: Boolean;

Description

Use Selected to select or unselect the item. If the MultiSelect property of the view is False, setting Selected to True sets the Selected property of all other items to False. The appearance of a selected item depends on whether it has focus and whether the system colors are used for selection.

If the item's Selectable property is False, the item cannot be selected, and assigning True to Selected does not change the value of the property. Selected can still return True while Selectable is False if the item was selected before Selectable was set to False.


TIconViewItem.States
 CLX Reference

TIconViewItem.States

TIconViewItem

Item state information.

property States: TItemStates

Description

The States property returns item state information. This set property can include isNone (default state), isFocused (has the focus), isSelected (is selected), and isActivating (active).


TIconViewItem.Top
 CLX Reference

TIconViewItem.Top

TIconViewItem	See also

Specifies the distance, in pixels, from the top edge of the view to the top edge of the item.

property Top: Integer;

Description

Top returns the vertical position of the item.


TIconViewItem.Width
 CLX Reference

TIconViewItem.Width

TIconViewItem 	See also

Returns item width.

property Width: Integer;

Description

Width returns the width, in pixels, of the item.


 CLX Reference

TIconViewItem Methods

TIconViewItem	Alphabetically	Legend

In TIconViewItem

BoundingRect

Create

Destroy

IconRect

MakeVisible

Move

MoveBy

Repaint

TextRect

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


 CLX Reference

TIconViewItem Methods

TIconViewItem	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BoundingRect

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

IconRect

InheritsFrom

InitInstance

InstanceSize

MakeVisible

MethodAddress

MethodName

Move

MoveBy

NewInstance

Repaint

SafeCallException

TextRect


TIconViewItem.BoundingRect
 CLX Reference

TIconViewItem.BoundingRect

TIconViewItem	See also

Returns the bounding rectangle of the item.

function BoundingRect: TRect;

Description

BoundingRect returns the bounding rectangle of the item in the view's client coordinate space.


TIconViewItem.Create
 CLX Reference

TIconViewItem.Create

TIconViewItem

Creates an instance of TIconViewItem.

constructor Create(AOwner: TIconViewItems);

Description

Call Create to instantiate a TIconViewItem object at runtime. Items added to the list view at design time are created automatically. At runtime, use the Add method of the view's Items object to create a list item and add it to the list view.


TIconViewItem.Destroy
 CLX Reference

TIconViewItem.Destroy

TIconViewItem	See also

Destroys an instance of TIconViewItem.

destructor Destroy; override;

Description

Do not call Destroy in application code. Instead, use Delete, which removes the item from the icon view before freeing the associated memory.


TIconViewItem.IconRect
 CLX Reference

TIconViewItem.IconRect

TIconViewItem	See also

Returns the bounding rectangle of the item icon.

function IconRect: TRect;

Description

IconRect returns the bounding rectangle of the item icon in the view's client coordinate space.


TIconViewItem.MakeVisible
 CLX Reference

TIconViewItem.MakeVisible

TIconViewItem

Make sure the item is visble.

procedure MakeVisible;

Description

MakeVisible makes the item visible, scrolling the view and as necessary.


TIconViewItem.Move
 CLX Reference

TIconViewItem.Move

TIconViewItem 	See also

Move the item.

procedure Move(const Pt: TPoint);

Description

Move repositions the item so that the upper left corner of the item bounding rectangle is at Pt.


TIconViewItem.MoveBy
 CLX Reference

TIconViewItem.MoveBy

TIconViewItem 	See also

Move the item relatively.

procedure MoveBy(const Pt: TPoint);

Description

MoveBy repositions the item relatively to its current position. Pt specifies the new position as an offset from the item's current position.


TIconViewItem.Repaint
 CLX Reference

TIconViewItem.Repaint

TIconViewItem

Repaint item.

procedure Repaint;

Description

Repaint repaints the item.


TIconViewItem.TextRect
 CLX Reference

TIconViewItem.TextRect

TIconViewItem	See also

Returns the bounding rectangle of the item caption.

function TextRect: TRect;

Description

TextRect returns the bounding rectangle of the item caption in the view's client coordinate space.


Hierarchy

TObject

TPersistent

TIconViewItem


IProperty
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TIconViewItems
 CLX Reference

TIconViewItems

Hierarchy	Properties	Methods	See also

TIconViewItems manages the item objects for an icon view control.

Unit

QComCtrls

Description

Use the properties and methods of TIconViewItems to manipulate the items displayed by an icon view control.


 CLX Reference

TIconViewItems Properties

TIconViewItems	Alphabetically	Legend

In TIconViewItems

Count

Item

Owner


 CLX Reference

TIconViewItems Properties

TIconViewItems	By Object	Legend

Count

Item

Owner


TIconViewItems.Count
 CLX Reference

TIconViewItems.Count

TIconViewItems	See also

Returns the number of items being managed.

property Count: Integer;

Description

Count returns the number of items that the object is managing.


TIconViewItems.Item
 CLX Reference

TIconViewItems.Item

TIconViewItems	See also

Lists all items managed by the TIconViewItems object.

property Item[Index: Integer]: TIconViewItem; default;

Description

Use Item to access a specific item, given its Index. Indexes range from 0 to Count - 1. Item is the default property, so

IconView1.Items.Item[I]

can be shortened to

IconView1.Items[I]


TIconViewItems.Owner
 CLX Reference

TIconViewItems.Owner

TIconViewItems	See also

Icon View that owns this object.

property Owner: TCustomIconView;

Description

Owner returns the icon view object that owns this object. The view's Items property refers back to the TIconViewItems object.


 CLX Reference

TIconViewItems Methods

TIconViewItems	Alphabetically	Legend

In TIconViewItems

Add

BeginUpdate

Clear

Create

DefineProperties

Delete

Destroy

EndUpdate

IndexOf

Insert

ReadData

WriteData

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


 CLX Reference

TIconViewItems Methods

TIconViewItems	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

ReadData

SafeCallException

WriteData


TIconViewItems.Add
 CLX Reference

TIconViewItems.Add

TIconViewItems	See also

Creates a new item and adds it to the icon view control.

function Add: TIconViewItem;

Description

Call Add to add a new item at the end of the control. Add returns the newly created item object.

To create an item and insert it into the beginning or middle of the view, use the Insert method instead.


TIconViewItems.BeginUpdate
 CLX Reference

TIconViewItems.BeginUpdate

TIconViewItems	See also

Prevents updating of the view until the EndUpdate method is called.

procedure BeginUpdate;

Description

Call BeginUpdate before making multiple changes to the 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 items are added, deleted, or moved.

BeginUpdate/EndUpdate sequences can be nested. The component tracks the nesting level and delays screen updates until the outermost EndUpdate is called.


TIconViewItems.Clear
 CLX Reference

TIconViewItems.Clear

TIconViewItems	See also

Removes all items from the view.

procedure Clear;

Description

Call Clear to empty the view of all items. Clear frees all memory associated with the items and updates the image of the view.


TIconViewItems.Create
 CLX Reference

TIconViewItems.Create

TIconViewItems	See also

Creates an instance of TIconViewItems.

constructor Create(AOwner: TCustomViewControl);

Description

Call Create to instantiate a TIconViewItems object at runtime. The TIconViewItems object used by TCustomViewControl to implement its Items property is created automatically by the view's constructor.


TIconViewItems.DefineProperties
 CLX Reference

TIconViewItems.DefineProperties

TIconViewItems	See also

Provides an interface for a method that reads and writes otherwise unpublished data.

procedure DefineProperties(Filer: TFiler); override;

Description

TIconViewItems overrides DefineProperties in order to persist individual items.


TIconViewItems.Delete
 CLX Reference

TIconViewItems.Delete

TIconViewItems	See also

Deletes a specified item and updates the view.

procedure Delete(Index: Integer);

Description

The Delete method deletes the item specified with the Index parameter. The first item in the view has an index of 0, the second item has an index of 1, and so on.


TIconViewItems.Destroy
 CLX Reference

TIconViewItems.Destroy

TIconViewItems	See also

Destroys an instance of TIconViewItems.

destructor Destroy; override;

Description

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

Destroy frees the list before calling the inherited destructor.


TIconViewItems.EndUpdate
 CLX Reference

TIconViewItems.EndUpdate

TIconViewItems	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.


TIconViewItems.IndexOf
 CLX Reference

TIconViewItems.IndexOf

TIconViewItems	See also

Returns the position of a list item in the view window.

function IndexOf(Value: TIconViewItem): Integer;

Description

Call IndexOf to determine the position of the item specified by the Value parameter. IndexOf returns -1 if the list item is not in the view.


TIconViewItems.Insert
 CLX Reference

TIconViewItems.Insert

TIconViewItems	See also

Creates a new item and inserts it into the list view.

function Insert(Index: Integer): TListItem;

Description

Call Insert to insert a new item object into the view at the specified Index. Insert returns the new item.


TIconViewItems.ReadData
 CLX Reference

TIconViewItems.ReadData

TIconViewItems	See also

Read streamed TIconViewItems collection.

procedure ReadData(Stream: TStream);

Description

ReadData is a protected method that reads a collection streamed by TIconViewItems.WriteData


TIconViewItems.WriteData
 CLX Reference

TIconViewItems.WriteData

TIconViewItems	See Also

Stream the collection.

procedure WriteData(Stream: TStream);

Description

WriteData is a protected method that streams the contents of the TIconViewItems collection. The stream can be read by TIconViewItems.ReadData.


Hierarchy

TObject

TPersistent

TIconViewItems


TLCDNumber
 CLX Reference

 TLCDNumber

Hierarchy	Properties	Methods	Events	See also

TLCDNumber represents a control that can display numeric information in a digit display format.

Unit

QStdCtrls

Description

The TLCDNumber component uses the seven segment display format to display numeric information.

These digits and other symbols can be shown: 0/O, 1, 2, 3, 4, 5/S, 6, 7, 8, 9/g, minus, decimal point, A, B, C, D, E, F, h, H, L, o, P, r, u, U, Y, colon, degree sign (which is specified as single quote in the string) and space. QLCDNumber substitutes spaces for illegal characters.

TLCDNumber implements the generic behavior introduced in TCustomLCDNumber. TLCDNumber publishes many of the properties inherited from TCustomLCDNumber, but does not introduce any new behavior.


 CLX Reference

TLCDNumber properties

TLCDNumber	Alphabetically	Legend

Derived from TCustomLCDNumber

AutoSize

Digits

Handle

Mode

PointSize

SegmentStyle

Value

Derived from TFrameControl

BorderStyle

Derived from TWidgetControl

Bitmap

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentShowHint

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TLCDNumber Properties

TLCDNumber	By Object	Legend

Action

Align

Anchors

AutoSize

Bitmap

BorderStyle

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Digits

DragMode

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Mode

Name

Owner

Parent

ParentColor

ParentShowHint

ParentWidget

PointSize

SegmentStyle

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Value

Visible

Width


 CLX Reference

TLCDNumber events

TLCDNumber	Alphabeticallyt	Legend

Derived from TCustomLCDNumber

OnOverflow

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TLCDNumber events

TLCDNumber	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnOverflow

OnStartDrag


 CLX Reference

TLCDNumber methods

TLCDNumber	Alphabetically	Legend

Derived from TCustomLCDNumber

Create

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TLCDNumber Methods

TLCDNumber	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomLCDNumber

TLCDNumber


TListBox
 CLX Reference

 TListBox

Hierarchy	Properties	Methods	Events	Using TListBox

TListBox is a wrapper for a Windows list box control.

Unit

QStdCtrls

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.


 CLX Reference

TListBox Properties

TListBox	By Object	Legend

Derived from TCustomListBox

Canvas

ChildHandle

ColumnLayout

Columns

ExtendedSelect

Handle

ItemHeight

ItemIndex

Items

MultiSelect

RowLayout

Rows

SelCount

Selected

Sorted

Style

TopIndex

Derived from TFrameControl

BorderStyle

Derived from TWidgetControl

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TListBox Properties

TListBox	By Object	Legend

Action

Align

Anchors

BorderStyle

BoundsRect

Brush

Canvas

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ColumnLayout

Columns

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

ExtendedSelect

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

ItemHeight

ItemIndex

Items

Left

MultiSelect

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

RowLayout

Rows

SelCount

Selected

ShowHint

Showing

Sorted

Style

TabOrder

TabStop

Tag

Top

TopIndex

Visible

Width


 CLX Reference

TListBox Events

TListBox	By Object	Legend

Derived from TCustomListBox

OnDrawItem

OnMeasureItem

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TListBox Events

TListBox	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDrawItem

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMeasureItem

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TListBox methods

TListBox	Alphabetically	Legend

Derived from TCustomListBox

Clear

ClearSelection

Create

Destroy

ItemAtPos

ItemRect

ItemVisible

MakeCurrentVisible

Sort

Update

VisibleItemCount

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TListBox Methods

TListBox	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

ItemAtPos

ItemRect

ItemVisible

MakeCurrentVisible

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Sort

Update

UpdateAction

UpdateControlState

VisibleItemCount


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomListBox

TListBox


TListItem
 CLX Reference

TListItem

Hierarchy	Properties	Methods	See also

TListItem is an individual item of a TListView control.

Unit

QComCtrls

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.


 CLX Reference

TListItem Properties

TListItem	Alphabetically	Legend

In TListItem

Caption

ListView

Owner

Derived from TCustomViewItem

Checked

Data

Focused

ImageIndex

Index

Selectable

Selected

SubItemImages

SubItems


 CLX Reference

TListItem Properties

TListItem	By Object	Legend

Caption

Checked

Data

Focused

ImageIndex

Index

ListView

Owner

Selectable

Selected

SubItemImages

SubItems


TListItem.Caption
 CLX 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.ListView
 CLX 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.Owner
 CLX 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.


 CLX Reference

TListItem Methods

TListItem	Alphabetically	Legend

In TListItem

Destroy

Derived from TCustomViewItem

AssignTo

Create

Delete

DisplayRect

MakeVisible

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


 CLX Reference

TListItem Methods

TListItem	By Object	Legend

AfterConstruction

Assign

AssignTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Delete

Destroy

Dispatch

DisplayRect

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MakeVisible

MethodAddress

MethodName

NewInstance

SafeCallException


TListItem.Destroy
 CLX 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.


Hierarchy

TObject

TPersistent

TCustomViewItem

TListItem


TListColumns
 CLX Reference

TListColumns

Hierarchy	Properties	Methods	See also

TListColumns is a collection of TListColumn objects.

Unit

QComCtrls

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.


 CLX Reference

TListColumns Properties

TListColumns	Alphabetically	Legend

In TListColumns

Items

ViewControl

Derived from TCollection

Count

ItemClass


 CLX Reference

TListColumns Properties

TListColumns	By Object	Legend

Count

ItemClass

Items

ViewControl


TListColumns.Items
 CLX 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.


TListColumns.ViewControl
 CLX Reference

TListColumns.ViewControl

TListColumns	See Also

Get related TListViewHeader.

property ViewControl: TCustomViewControl;

Description

If the TListColumns collection is being used by a TListViewHeader control, this protected, read-only property returns a reference to that control. Otherwise, the property returns nil.


 CLX Reference

TListColumns Methods

TListColumns	Alphabetically	Legend

In TListColumns

Add

Added

Derived from TCustomHeaderSections

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


 CLX Reference

TListColumns Methods

TListColumns	By Object	Legend

Add

Added

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
 CLX 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.Added
 CLX Reference

TListColumns.Added

TListColumns	See also

Responds when items are added to the collection.

procedure Added(var Item: TListColumnsItem); override;

Description

TListColumns overrides Added in order to redraw the list view to include the new column.


Hierarchy

TObject

TPersistent

TCollection

TCustomHeaderSections

TListColumns


TListItems
 CLX Reference

TListItems

Hierarchy	Properties	Methods	See also

TListItems maintains the collection of items that appear in a list view control.

Unit

QComCtrls

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.


 CLX Reference

TListItems Properties

TListItems	Alphabetically	Legend

In TListItems

Item

Owner

Derived from TCustomViewItems

Count


 CLX Reference

TListItems Properties

TListItems	By Object	Legend

Count

Item

Owner


TListItems.Item
 CLX 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
 CLX 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.


 CLX Reference

TListItems Methods

Legend

In TListItems

Add

AddItem

DefineProperties

FindItem

Insert

ReadData

WriteData

Derived from TCustomViewItems

BeginUpdate

ChangeItemTypes

Clear

Delete

Destroy

EndUpdate

IndexOf

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


 CLX Reference

TListItems Methods

TListItems	By Object	Legend

Add

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ChangeItemTypes

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

DefaultHandler

DefineProperties

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItem

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

IndexOf

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

ReadData

SafeCallException

WriteData


TListItems.Add
 CLX 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.AddItem
 CLX Reference

TListItems.AddItem

TListItems	See also

Adds an item in a specified location.

function AddItem(Item: TListItem; Index: Integer = -1): TListItem;

Description

Call AddItem to add an Item at any place in the list. The properties of Item are duplicated if Item is not nil. Index is location of the added item; if Index is negative, the TListItem is appended to the end of the list.

AddItem returns the TListItem that was added.


TListItems.DefineProperties
 CLX 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.FindItem
 CLX Reference

TListItems.FindItem

TListItems

Find list item corresponding to Qt control.

function FindItem(ItemH: QListViewItemH): TListItem;

Description

FindItem is a protected method that searches the TListItems collection for the TListItem object that corresponds to the Qt control whose handle is ItemH. If the TListItem is not in the collection, nil is returned.


TListItems.Insert
 CLX 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.ReadData
 CLX Reference

TListItems.ReadData

TListItems	See also

Read streamed TListItems collection.

procedure ReadData(Stream: TStream);

Description

ReadData is a protected method that reads a collection streamed by TListItems.WriteData


TListItems.WriteData
 CLX Reference

TListItems.WriteData

TListItems	See Also

Stream the collection.

procedure WriteData(Stream: TStream);

Description

WriteData is a protected method that streams the contents of the TListItems collection. The stream can be read by TListItems.ReadData.


Hierarchy

TObject

TPersistent

TCustomViewItems

TListItems


TObjectList
 CLX 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.


 CLX Reference

TObjectList properties

TObjectList	Alphabetically	Legend

In TObjectList

Items

OwnsObjects

Derived from TList

Capacity

Count

List


 CLX Reference

TObjectList properties

TObjectList	By object	Legend

Capacity

Count

Items

List

OwnsObjects


TObjectList.Items
 CLX 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
 CLX 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.


 CLX Reference

TObjectList methods

TObjectList	Alphabetically	Legend

In TObjectList

Add

Create

FindInstanceOf

IndexOf

Insert

Remove

Derived from TList

Assign

Clear

Delete

Destroy

Extract

Error

Exchange

Expand

First

Last

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


 CLX 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
 CLX 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
 CLX 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.FindInstanceOf
 CLX 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.IndexOf
 CLX 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
 CLX 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.Remove
 CLX 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


TPaintBox
 CLX Reference

 TPaintBox

Hierarchy	Properties	Methods	Events	Using TPaintBox	See also

TPaintBox provides a canvas that applications can use for rendering an image.

Unit

QExtCtrls

Description

Use TPaintBox to add custom images to a form. Unlike TImage, which displays an image that is stored in a bitmap or drawing, 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.


 CLX Reference

TPaintBox properties

TPaintBox	Alphabetically	Legend

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Enabled

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TPaintBox properties

TPaintBox	By object	Legend

Action

Align

Anchors

BoundsRect

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Tag

Top

Visible

Width


 CLX Reference

TPaintBox events

TPaintBox	Alphabetically	Legend

In TPaintBox

OnPaint

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnMouseDown

OnMouseMove

OnMouseUp


 CLX Reference

TPaintBox events

TPaintBox	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnMouseDown

OnMouseMove

OnMouseUp

OnPaint


TPaintBox.OnPaint
 CLX 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.


 CLX Reference

TPaintBox methods

TPaintBox	Alphabetically	Legend

In TPaintBox

Create

Derived from TGraphicControl

Destroy

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

Invalidate

ParentToClient

Refresh

Repaint

ScreenToClient

SendToBack

SetBounds

Show

Update

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX 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

DragDrop

Dragging

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

Show

Update

UpdateAction


TPaintBox.Create
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TPaintBox


TPanel
 CLX Reference

 TPanel

Hierarchy	Properties	Methods	Events	Using TPanel	See also

TPanel implements a generic panel control.

Unit

QExtCtrls

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.

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.


 CLX Reference

TPanel properties

TPanel	Alphabetically	Legend

Derived from TCustomPanel

Alignment

BevelInner

BevelOuter

BevelWidth

BorderStyle

BorderWidth

Caption

Derived from TWidgetControl

Bitmap

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TPanel properties

TPanel	By object	Legend

Action

Align

Alignment

Anchors

BevelInner

BevelOuter

BevelWidth

Bitmap

BorderStyle

BorderWidth

BoundsRect

Brush

Caption

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

Top

Visible

Width


 CLX Reference

TPanel events

TPanel	Alphabetically	Legend

Derived from TWidgetControl

OnEnter

OnExit

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDrag


 CLX Reference

TPanel events

TPanel	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDrag


 CLX Reference

TPanel methods

TPanel	Alphabetically	Legend

Derived from TCustomPanel

Create

Derived from TCustomControl

Destroy

Invalidate

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX 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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomControl

TCustomPanel

TPanel


TPenRecall
 CLX Reference

TPenRecall

Hierarchy	Properties	Methods	See also

TPenRecall saves and restores the properties of a TPen object.

Unit

QGraphics

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.


 CLX Reference

TPenRecall properties

TPenRecall	Alphabetically	Legend

Derived from TRecall

Reference


 CLX Reference

TPenRecall properties

TPenRecall	By object	Legend

Reference


 CLX 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


 CLX 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
 CLX 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


TPersistent
 CLX Reference

TPersistent

Hierarchy	Methods	See also

TPersistent is the ancestor for all objects that have assignment and streaming capabilities(xfm 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TPicture
 CLX Reference

TPicture

Hierarchy	Properties	Methods	Events	See also

TPicture contains a bitmap, icon graphic, or user-defined graphic.

Unit

QGraphics

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.

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 graphicThe 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 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.


 CLX Reference

TPicture properties

TPicture	Alphabetically	Legend

In TPicture

Bitmap

Graphic

Height

Icon

Width


 CLX Reference

TPicture properties

TPicture	By object	Legend

Bitmap

Graphic

Height

Icon

Width


TPicture.Bitmap
 CLX Reference

TPicture.Bitmap

TPicture	See also

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 Drawing 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
 CLX 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, drawing, 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
 CLX 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
 CLX Reference

TPicture.Icon

TPicture	See also

Specifies the contents of the TPicture object as an icon graphic.

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.Width
 CLX 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.


 CLX Reference

TPicture events

TPicture	Alphabetically	Legend

In TPicture

OnChange

OnProgress


 CLX Reference

TPicture events

TPicture	By object	Legend

OnChange

OnProgress


TPicture.OnChange
 CLX 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
 CLX 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: WideString) 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.

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.


 CLX Reference

TPicture methods

TPicture	Alphabetically	Legend

In TPicture

Assign

Create

Destroy

LoadFromFile

LoadFromMimeSource

LoadFromStream

RegisterFileFormat

RegisterFileFormatRes

SaveToFile

SaveToMimeSource

SaveToStream

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


 CLX 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

LoadFromFile

LoadFromMimeSource

LoadFromStream

MethodAddress

MethodName

NewInstance

QueryInterface

RegisterFileFormat

RegisterFileFormatRes

SafeCallException

SaveToFile

SaveToMimeSource

SaveToStream

UnregisterGraphicClass


TPicture.Assign
 CLX Reference

TPicture.Assign

TPicture	See also

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.

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
 CLX 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 LoadFromMimeSource or LoadFromFile method to assign a graphical image to the picture, so that it is available to the application.


TPicture.Destroy
 CLX 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.LoadFromFile
 CLX 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.LoadFromMimeSource
 CLX Reference

TPicture.LoadFromMimeSource

TPicture	See also

Reads the mime source specified in MimeSource and loads the data into the TPicture object.

procedure LoadFromMimeSource(MimeSource: TMimeSource);

Description

Use LoadFromMimeSource to read a picture from a TMimeSource object. The TGraphic class created is determined by the type of data contained in the mime source.


TPicture.LoadFromStream
 CLX Reference

TPicture.LoadFromStream

TPicture	See also

Reads the picture from a Stream.

procedure LoadFromStream(Stream: TStream);

Description

Use LoadFromStream to read a picture from a TStream object. The TGraphic class created is determined by the type of data contained in the stream.

The data in the stream should be previously written by a call to the SaveToStream method of another TPicture or of a TGraphic descendant.


TPicture.RegisterFileFormat
 CLX 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
 CLX 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.SaveToFile
 CLX 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.SaveToMimeSource
 CLX Reference

TPicture.SaveToMimeSource

TPicture	See also

Saves the picture to the mime source specified in the MimeSource parameter.

procedure SaveToMimeSource(MimeSource: TClxMimeSource);

Description

Use SaveToMimeSource to save a picture to the TMimeSource object specified by the MimeSource parameter.

The saved picture can be loaded to another TPicture or to an appropriate TGraphic descendant by calling its LoadFromMimeSource method.


TPicture.SaveToStream
 CLX Reference

TPicture.SaveToStream

TPicture	See also

Saves the picture to a stream.

procedure SaveToStream(Stream: TClxStream);

Description

Use SaveToStream to save a picture to the TStream object specified by the Stream parameter.

The saved picture can be loaded to another TPicture or to an appropriate TGraphic descendant by calling its LoadFromStream method.


TPicture.UnregisterGraphicClass
 CLX 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 RegisterFileFormator RegisterFileFormatRes 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


TPropertyEditor
 CLX 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.


 CLX Reference

TPropertyEditor properties

TPropertyEditor	Alphabetically 	Legend

In TPropertyEditor

Designer

PrivateDirectory

PropCount

Value

Derived from TInterfacedObject

RefCount


 CLX Reference

TPropertyEditor properties

TPropertyEditor	By object 	Legend

Designer

PrivateDirectory

PropCount

RefCount

Value


TPropertyEditor.Designer
 CLX 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
 CLX 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.

The property editor can use the directory to read files, write files, or store shared objects and executables.


TPropertyEditor.PropCount
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 TWidgetControl 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
 CLX 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 TWidgetControl 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TReader
 CLX 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.


 CLX Reference

TReader properties

TReader	Alphabetically	Legend

In TReader

Owner

Parent

Position

Derived from TFiler

Ancestor

IgnoreChildren

LookupRoot

Root


 CLX Reference

TReader properties

TReader	By object	Legend

Ancestor

IgnoreChildren

LookupRoot

Owner

Parent

Position

Root


TReader.Owner
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TReader events

TReader	Alphabetically	Legend

In TReader

OnAncestorNotFound

OnCreateComponent

OnError

OnFindComponentClass

OnFindMethod

OnReferenceName

OnSetName


 CLX Reference

TReader events

TReader	By object	Legend

OnAncestorNotFound

OnCreateComponent

OnError

OnFindComponentClass

OnFindMethod

OnReferenceName

OnSetName


TReader.OnAncestorNotFound
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TRecall properties

TRecall	Alphabetically	Legend

In TRecall

Reference


 CLX Reference

TRecall properties

TRecall	By object	Legend

Reference


TRecall.Reference
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TReplaceDialog
 CLX Reference

 TReplaceDialog

Hierarchy	Properties	Methods	Events	See also

TReplaceDialog displays a search-and-replace dialog.

Unit

QDialogs

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.


 CLX Reference

TReplaceDialog properties

TReplaceDialog	Alphabetically	Legend

In TReplaceDialog

ReplaceText

Derived from TFindDialog

FindText

Options

Derived from TDialog

HelpContext

HelpKeyword

HelpType

Position

Title

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TReplaceDialog properties

TReplaceDialog	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

FindText

HelpContext

HelpKeyword

HelpType

Name

Options

Owner

Position

ReplaceText

Tag

Title


TReplaceDialog::ReplaceText
 CLX 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.


 CLX Reference

TReplaceDialog events

TReplaceDialog	Alphabetically	Legend

In TReplaceDialog

OnReplace

Derived from TFindDialog

OnFind

Derived from TDialog

OnClose

OnShow


 CLX Reference

TReplaceDialog events

TReplaceDialog	By object	Legend

OnClose

OnFind

OnReplace

OnShow


TReplaceDialog.OnReplace
 CLX 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.


 CLX Reference

TReplaceDialog methods

TReplaceDialog	Alphabetically	Legend

In TReplaceDialog

Create

Derived from TFindDialog

Derived from TCustomDialog

Execute

InvokeHelp

Derived from TComponent

BeforeDestruction

Destroy

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


 CLX 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

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TReplaceDialog.Create
 CLX 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

TDialog

TCustomDialog

TFindDialog

TReplaceDialog


Abs Example
 CLX Reference

Abs Example

var

  r: Single;

  i: Integer;

begin

  r := Abs(-2.3);	{ 2.3 }

  i := Abs(-157);	{ 157 }

end;


Addr Example
 CLX 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
 CLX Reference

ArcTan Example

var
  R: Extended;

begin

  R := ArcTan(Pi);

end;


Assert Example
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

Concat Example

var

  S: string;

begin

  S := Concat('ABC', 'DEF');     { 'ABCDEF' }

end;


Cos Example
 CLX Reference

Cos Example

 var R: Extended;

begin

  R := Cos(Pi);

end;


Date Example
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

Delete Example

var

   s: string;

 begin

   s := 'Honest Abe Lincoln';

   Delete(s,8,4);

   Canvas.TextOut(10, 10, s);	{ 'Honest Lincoln' }

 end;


Dispose Example
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

Eoln Example

begin

 { Tells program to wait for keyboard input }

   WriteLn(Eoln);

 end;


Erase Example
 CLX 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
 CLX 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
 CLX 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], 0, mbNo) = IDYes then

    DeleteFile(FileName);


FileExists, RenameFile, FileCreate, FileWrite, FileClose, ExtractFileName Example
 CLX 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
 CLX 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
 CLX 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;


FileOpen, FileSeek, FileRead Example
 CLX 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
 CLX Reference

FileSearch, ShowMessage Example

The following example uses an edit control and a button on a form. When the button is clicked, the current directoryis 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

  FileToFind := FileSearch(Edit1.Text, GetCurrentDir);

  if FileToFind = '' then

    ShowMessage('Couldn''t find ' + Edit1.Text + '.')

  else

    ShowMessage('Found ' + FileToFind + '.');

end;


FillChar Example
 CLX 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
 CLX 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
 CLX 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;


FormatDateTime Example
 CLX 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
 CLX 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
 CLX Reference

Frac Example

var

 R: Real;

begin

  R := Frac(123.456);    { 0.456 }

  R := Frac(-123.456);   { -0.456 }

end;


FreeMem Example
 CLX 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;


GetDir Example
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

GraphicExtension, GraphicFilter, DefaultExt, Filter Example

This code displays a Save dialog box with the TBitmap default extension:

SaveDialog1.DefaultExt := GraphicExtension(TBitmap);

SaveDialog1.Filter := GraphicFilter(TBitmap);

if SaveDialog1.Execute then

  {save the graphic }


Halt Example
 CLX 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
 CLX Reference

Hi Example

var B: Byte;

begin

  B := Hi($1234);   { $12 }

end;


Inc Example
 CLX Reference

Inc Example

var

  IntVar: Integer;

  LongintVar: Longint;

begin

  Inc(IntVar);	{ IntVar := IntVar + 1 }

  Inc(LongintVar, 5);	{ LongintVar := LongintVar + 5 }

end;


InputBox Example
 CLX 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
 CLX 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
 CLX Reference

Insert Example

var

  S: string;

begin

  S := 'Honest Lincoln';

  Insert('Abe ', S, 8);                    { 'Honest Abe Lincoln' }

end;


Int Example
 CLX Reference

Int Example

var

  R: Real;

begin

  R := Int(123.456);    { 123.0 }

  R := Int(-123.456);   { -123.0 }

end;


Length, IntToHex Example
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

Lo Example

var B: Byte;

begin

  B := Lo($1234);   { $34 }

end;


Low, High Example
 CLX 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 + #10;

  S := S + 'Sum of List2: ';

  Str(Sum(List2):4:2, TempStr);

  S := S + TempStr;

  MessageDlg(S, mtInformation, [mbOk], 0);

end;


LowerCase Example
 CLX 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
 CLX 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, mbYes) = mrYes then

  begin

    MessageDlg('Exiting the Object Pascal application.', mtInformation,

      [mbOk], 0, mbOk);

    Close;

  end;

end;


MessageDlgPos Example
 CLX 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, mbYes);

end;


MkDir Example
 CLX 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, mbOk)

  else

    MessageDlg('New directory created', mtInformation, [mbOk], 0, mbOk);

end;


Move Example
 CLX Reference

Move Example

var

  A: array[1..4] of Char;

  B: Integer;

begin

  Move(A, B, SizeOf(B));  { SizeOf = safety! }

end;


New Example
 CLX 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
 CLX 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
 CLX Reference

Ord Example

uses Dialogs;

type

   Colors = (RED,BLUE,GREEN);

var

  S: string;

 begin

   S := 'BLUE has an ordinal value of ' + IntToStr(Ord(BLUE)) + #10;

   S := S + 'The ASCII code for "c" is ' + IntToStr(Ord('c')) +  ' decimal';

   MessageDlg(S, mtInformation, [mbOk], 0, mbOK);

 end;


ParamStr Example
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

Pred, Succ Example

uses Dialogs;

type

   Colors = (RED,BLUE,GREEN);

 var

   S: string;

 begin

   S := 'The predecessor of 5 is ' + IntToStr(Pred(5)) + #10;

   S := S + 'The successor of 10 is ' + IntToStr(Succ(10)) + #10;

   if Succ(RED) = BLUE then1

     S := S + 'In the type Colors, RED is the predecessor of BLUE.';

   MessageDlg(S, mtInformation, [mbOk], 0, mbOk);

 end;


Randomize, Random Example
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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, mbOk)

   else

     MessageDlg('Directory removed', mtInformation, [mbOk], 0, mbOk);

 end;


Round Example
 CLX Reference

Round Example

var

   S, T: string;

begin

   Str(1.4:2:1, T);

   S := T + ' rounds to ' + IntToStr(Round(1.4)) + #10;

   Str(1.5:2:1, T);

   S := S + T + ' rounds to ' + IntToStr(Round(1.5)) + #10;

   Str(-1.4:2:1, T);

   S := S + T + ' rounds to ' + IntToStr(Round(-1.4)) + #10;

   Str(-1.5:2:1, T);

   S := S + T + ' rounds to ' + IntToStr(Round(-1.5));

   MessageDlg(S, mtInformation, [mbOk], 0, mbOk);

end;


RunError Example
 CLX Reference

RunError Example

begin

{$IFDEF Debug}

  if P = nil then

    RunError(204);

{$ENDIF}

end;


SeekEof Example
 CLX 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
 CLX 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.


Set8087CW Example
 CLX Reference

Set8087CW Example

procedure NumericExample;

var

  Saved8087CW: Word;

begin

  Saved8087CW := Default8087CW;

  Set8087CW($133f); { Disable all fpu exceptions }

  ThirdPartyRoutine;

  Set8087CW(Saved8087CW);

end;


SetMemoryManager Example
 CLX 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
 CLX Reference

SetTextBuf Example

program SetTextBufExample;

{$APPTYPE CONSOLE}

var

  Source, Destination: TextFile;

  AFileName: string;

  AChar: Char;

  Buf: array[1..4096] of Char;  { 4K buffer }

begin

  Write('Enter filename: ');

  Readln(AFileName);

  AssignFile(Source, AFileName);

  { Larger buffer for faster reads }

  SetTextBuf(Source, Buf);

  Reset(Source);

  { Dump text file into another file }

  AssignFile(Destination, 'WOOF.DOG');

  Rewrite(Destination);

  while not Eof(Source) do

  begin

    Read(Source, AChar);

    Write(Destination, AChar);

  end;

  CloseFile(Source);

  CloseFile(Destination);

end.


ShortCut Example
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

Sqr, Sqrt Example

var

  S, Temp: string;

begin

   Str(Sqr(5.0):3:1, Temp);

   S := '5 squared is ' + Temp + #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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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', [smbOK], smsInformation, smbOK, smbCancel);

  Application.MessageBox(SecondHalf, 'Second Half', [smbOK], smsInformation, smbOK, smbCancel);

  FreeMem(FirstHalf);

  FreeMem(SecondHalf);

end;


StrLComp Example
 CLX 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
 CLX 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', [smbOK], smsInformation, smbOK, smbCancel);

end;


StrLIComp Example
 CLX 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
 CLX 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
 CLX 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;


StrPCopy Example
 CLX 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
 CLX 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;


StrScan Example
 CLX 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 = '\Test.* ';

begin

  if HasWildcards(P) then

    ShowMessage('The string has wildcards')

  else

    ShowMessage('The string doesn't have wildcards');

end;


StrToDate, DayOfWeek Example
 CLX 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;


StrToInt Example
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

StrUpper Example

uses SysUtils;

const

  S: PChar = 'A fUnNy StRiNg'

begin

  Canvas.TextOut(5, 10, string(StrLower(S)) + ' ' +   string(StrUpper(S)));

end;


Time Example
 CLX 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
 CLX Reference

Trunc Example

var

   S, T: string;

begin

   Str(1.4:2:1, T);

   S := T + ' Truncs to ' + IntToStr(Trunc(1.4)) + #10;

   Str(1.5:2:1, T);

   S := S + T + ' Truncs to ' + IntToStr(Trunc(1.5)) + #10;

   Str(-1.4:2:1, T);

   S := S + T + ' Truncs to ' + IntToStr(Trunc(-1.4)) + #10;

   Str(-1.5:2:1, T);

   S := S + T + ' Truncs to ' + IntToStr(Trunc(-1.5));

   MessageDlg(S, mtInformation, [mbOk], 0, mbOk);

end;


Truncate Example
 CLX 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
 CLX 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
 CLX 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
 CLX 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, mbOk);

  else

    Canvas.TextOut(10, 10, 'Value = ' + IntToStr(I));

end;


VarArrayCreate, VarArrayOf Example
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

ErrorProc Example

procedure MyErrorHandler(ErrorCode: Byte; ErrorAddr: Pointer);

ErrorProc := @MyErrorHandler


Screen Example
 CLX 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
 CLX 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
 CLX 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;


 CLX Reference


TResourceStream
 CLX Reference

TResourceStream

Hierarchy	Properties	Methods	See also

TResourceStream is a memory stream that provides access to the compiled resources in an application.

Unit

Classes

Description

Use TResourceStream to read the resources of an 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.


 CLX Reference

TResourceStream properties

TResourceStream	Alphabetically	Legend

Derived from TCustomMemoryStream

Memory

Derived from TStream

Position

Size


 CLX Reference

TResourceStream properties

TResourceStream	By object	Legend

Memory

Position

Size


 CLX 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


 CLX 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
 CLX 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  instance handle associated with the executable or shared object (.so file) 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.

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
 CLX 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  instance handle associated with the executable or shared object (.so file) 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.

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
 CLX 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
 CLX 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
 CLX Reference

CreateAction function

See also

Creates an action of a specified type.

Unit

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 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
 CLX Reference

EnumRegisteredActions procedure

See also

Iterates through the list of registered actions, passing them to a user-defined callback.

Unit

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
 CLX Reference

RegisterActions procedure

See also

Registers action classes so that they appear in the list of predefined actions in the action list editor.

Unit

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 as a selection when you choose New 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, 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
 CLX Reference

UnRegisterActions procedure

See also

Unregisters a set of actions.

Unit

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.


ActivateClassGroup procedure
 CLX 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.


BinToHex procedure
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


ExtractStrings function
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

GetClass function

See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 .xfm 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
 CLX 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
 CLX 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 and by several Linux utilities. 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 .xfm 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
 CLX 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
 CLX 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 .xfm file.


PointsEqual function
 CLX 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
 CLX Reference

ReadComponentRes function

See also

Reads components and their properties from a specified 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 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
 CLX 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
 CLX Reference

ReadComponentResFile function

See also	Example

Reads components and their properties from a specified 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 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
 CLX 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;

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


SmallPoint function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

WriteComponentResFile procedure

See also	Example

Writes components and their properties to a file using a 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 resource-file format.

To read a component written with WriteComponentResFile, call ReadComponentResFile.


Clipboard function
 CLX Reference

Clipboard function

See also

Returns an instance of TClipboard.

Unit

QClipbrd

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 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 QClipbrd to the uses clause.


SetClipboard function
 CLX Reference

SetClipboard function

See also

Replaces the single global clipboard instance with another clipboard object.

Unit

QClipbrd

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.


AddDragFormat function
 CLX Reference

AddDragFormat function

Put formatted data in clipboard.

Unit

QControls

Category

drag operation support

function AddDragFormat(const Format: string; Stream: TStream): Boolean;

Description

Call AddDragFormat to put formatted data on the clipboard. The data is contained in Stream is associated with the format string specified in Format. The format string should be a MIME type name. Proprietary type names may also work, but will probably not be available on all platforms.

AddDragFormat returns true if the operation was successful.


AdjustForClient procedure
 CLX Reference

AdjustForClient procedure

Adjust client rectangle to represent client area.

Unit

QControls

Category

drag operation support

procedure AdjustForClient(var ARect: TRect);

Description

Use AdjustToClient to modify a TRect so that it represents a client area. AdjustForClient moves the top-left corner of ARect to 0,0, but leaves the dimensions of the rectangle unchanged.


AdjustForFrameprocedure
 CLX Reference

AdjustForFrame procedure

Convert client geometry between CLX and Qt conventions.

Unit

QControls

Category

drag operation support

procedure AdjustForFrame(Widget: QWidgetH; var ALeft, ATop, AWidth, AHeight: Integer; ToQt: Boolean);

Description

Qt and CLX use different conventions to describe control geometry. In Qt, geometry refers to the client area, and the rest of the control is the frame. In VCL, geometry refers to the whole control. AdjustForFrame converts between these two convetions. Widget is the control whose geometry is being converted. ToQt is True for conversion from CLX to Qt, False for conversion from Qt to CLX


Beep function
 CLX Reference

Beep function

See also

Generates a message beep.

Unit

QControls

Category

miscellaneous routines

procedure Beep;

Description

Beep generates a message beep using a Qt API.


ButtonStateToShiftState function
 CLX Reference

ButtonStateToShiftState function

Converts Qt button state value.

Unit

QControls

Category

mouse handling utilities

function ButtonStateToShiftState(ButtonState: Qt.ButtonState): TShiftState;

Description

Use ButtonStateToShiftState to convert a value from the Qt enum Qt::ButtonState to the equivalent TShiftState value.


CursorToIdent function
 CLX Reference

CursorToIdent function

See also

Returns the name of the predefined constant that corresponds to a cursor.

Unit

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
 CLX Reference

CursorToString function

See also

Returns the AnsiString representation of a cursor.

Unit

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.


DragImageList function
 CLX Reference

DragImageList function

See also

Returns list of drag images

Unit

QControls

Category

Drag and Drop utilities

function DragImageList: TImageList;

Description

DragImageList returns the global drag image list. The specific image used is determined by TControl.DragImageIndex. The location of the drag image, relative to the mouse cursor, is determined by TControl.DragImageHotspot.


FindControl function
 CLX Reference

FindControl function

See also

Returns the widget whose window is identified by the specifiedhandle or which appears at a specified position.

Unit

QControls

Category

Widget utilitiesWidget utilities

function FindControl(Handle: QWidgetH): TWidgetControl;

function FindControl(const Pos: TPoint): TWidgetControl;

Description

Call FindControl to access the widget whose window is identified by the Handle parameter or which appears at the position specified by the Pos parameter. If Handle is not the handle of a widget, or if there is no widget at the specified position, FindControl returns nil.


FindDragTarget function
 CLX Reference

FindDragTarget function

See also

Returns the control at a specified screen coordinate.

Unit

QControls

Category

drag operation support

function FindDragTarget(const Pos: TPoint; AllowDisabled: Boolean): TControl;

Description

Call FindDragTarget to determine the potential drag-and-drop 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 event handler that accepts the object.


FindObject function
 CLX Reference

FindObject function

See also

Returns the CLX object that represents a Qt widget.

Unit

QControls

Category

mouse handling utilities

function FindObject(Handle: QObjectH): TObject;

Description

FindObject returns a reference to the CLX object that represents the Qt widget indicated by Handle. This is the inverse of reading the Handle property.


GetCaptureControl function
 CLX Reference

GetCaptureControl function

See also

Returns the control, if any, that currently receives all mouse messages.

Unit

QControls

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.

GetCaptureControl is equivalent to GetMouseGrabControl.


GetCursorPos procedure
 CLX Reference

GetCursorPos procedure

Return mouse cursor position.

Unit

QControls

Category

mouse handling utilities

procedure GetCursorPos(var P: TPoint);

Description

Call GetCursorPos to determine the current screen coordinates of the mouse cursor.


GetCursorValues procedure
 CLX Reference

GetCursorValues procedure

See also

Passes the name of every predefined cursor constant to a callback.

Unit

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
 CLX Reference

GetLongHint function

See also	Example

Returns the second part of a two-part hint string.

Unit

QControls

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.


GetMouseGrabControl function
 CLX Reference

GetMouseGrabControl function

See also

Returns the control, if any, that currently receives all mouse messages.

Unit

QControls

Category

mouse handling utilities

function GetMouseGrabControl: TControl;

Description

Call GetMouseGrabControl 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.

GetMouseGrabControl is equivalent to GetCaptureControl


GetShortHint function
 CLX Reference

 AGetShortHint function

See also	Example

Returns the first part of a two-part hint string.

Unit

QControls

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
 CLX Reference

IdentToCursor function

See also

Translates a predefined cursor constant into a cursor.

Unit

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.


InDragDropOperation function
 CLX Reference

InDragDropOperation function

See also

Report drag operation status.

Unit

QControls

Category

cursor management routines

function InDragDropOperation: Boolean;

Description

InDragDropOperation returns True if a drag opeation is in progress.


Mouse variable
 CLX Reference

Mouse variable

Contains information about the system’s mouse.

Unit

QForms

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.


SaveDragDataToStream function
 CLX Reference

SaveDragDataToStream function

See also

Retrieve drag payload.

Unit

QControls

Category

drag operation support

function SaveDragDataToStream(Stream: TStream; const Format: string): Boolean;

Description

Use SaveDragDataToStream to retrieve encoded payload data from the most recent drag operation. Format specifies the format to retrieve, which is placed in Stream. SaveDragDataToStream returns true if the operation was successful.


SetCaptureControl procedure
 CLX Reference

SetCaptureControl procedure

See also

Causes the specified control to receive all mouse messages.

Unit

QControls

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.

SetCaptureControl is equivalent to SetMouseGrabControl.

Note:	Many controls capture the mouse in response to mouse events.  Application code should avoid explicitly capturing the mouse.


SetMouseGrabControl procedure
 CLX Reference

SetMouseGrabControl procedure

See also

Causes the specified control to receive all mouse messages.

Unit

QControls

Category

mouse handling utilities

procedure SetMouseGrabControl(Control: TControl);

Description

Call SetMouseGrabControl 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.

SetMouseGrabControl is equivalent to SetCaptureControl.

Note:	Many controls capture the mouse in response to mouse events.  Application code should avoid explicitly capturing the mouse.


StringToCursor function
 CLX Reference

StringToCursor function

See also

Returns a TCursor value given its string representation.

Unit

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.


SupportedDragFormats procedure
 CLX Reference

SupportedDragFormats procedure

See also

Return list of formats supported in current drag operation.

Unit

QControls

Category

drag operation support

procedure SupportedDragFormats(List: TStrings);

Description

SupportedDragFormats adds all formats supported in the current drag operation to List.


CompareDateTime function
 CLX 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.


DateOf function
 CLX 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
 CLX 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
 CLX 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.


DayOf function
 CLX 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
 CLX 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
 CLX 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.


DayOfTheYear function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


DecodeDateTime procedure
 CLX 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
 CLX 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.


EncodeDateDay function
 CLX 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.


EncodeDateTime function
 CLX 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
 CLX 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.

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.


EndOfADay function
 CLX 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
 CLX 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
 CLX 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.

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


IsValidDate function
 CLX 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
 CLX 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.


IsValidDateTime function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


RecodeDate function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


SameDateTime function
 CLX 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.


SecondOf function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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).


TryEncodeDateDay function
 CLX 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.


TryEncodeDateTime function
 CLX 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
 CLX 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.


TryRecodeDateTime function
 CLX 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.


WeekOf function
 CLX 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
 CLX 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.

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference


InputBox function
 CLX Reference

InputBox function

See also 	Example

Displays an input dialog box that lets the user enter a string, double, or integer.

Unit

QDialogs

Category

dialog and message routines

function InputBox(const ACaption, APrompt, ADefault: WideString ): WideString; overload;

function InputBox(const ACaption, APrompt: WideString ; ADefault: Double; Min: Double = Low(Integer); Max: Double = High(Integer); Decimals: Integer = 1): Double; overload;

function InputBox(const ACaption, APrompt: WideString; ADefault: Integer; Min: Integer = Low(Integer); Max: Integer = High(Integer); Increment: Integer = 1): Integer; overload;

Description

Call InputBox to bring up an input dialog box ready for the user to enter a string, double, or integer 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 value that appears in the edit box when the dialog box first appears.

AMin is the minimum value the user can enter into the edit box.

AMax is the maximum value the user can enter into the edit box.

Decimals does nothing.

Increment controls the amount by which the value in the spin control changes when the user clicks the up or down arrow. (It has no effect on values that the user types).

If the user chooses the Cancel button, InputBox returns the default value. If the user chooses the OK button, InputBox returns the value 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
 CLX Reference

InputQuery function

See also 	Example

Displays an input dialog box that lets the user enter a string, double, or integer.

Unit

QDialogs

Category

dialog and message routines

function InputQuery(const ACaption, APrompt: WideString; var Value: WideString): Boolean; overload;

function InputQuery(const ACaption, APrompt: WideString; var Value: string): Boolean; overload;

function InputQuery(const ACaption, APrompt: WideString; var Value: Double, Min: Double = Low(Integer); Max: Double = High(Integer); Decimals: Integer = 1): Boolean; overload;

function InputQuery(const ACaption, APrompt: WideString; var Value: Integer, Min: Integer = Low(Integer); Max: Integer = High(Integer); Increment: Integer = 1): Boolean; overload;

Description

Call InputQuery to bring up an input dialog box ready for the user to enter a string, double, or integer 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 value that appears in the edit box when the dialog box first appears and which returns the value that the user enters.

AMin is the minimum value the user can enter into the edit box.

AMax is the maximum value the user can enter into the edit box.

Decimals does nothing.

Increment controls the amount by which the value in the spin control changes when the user clicks the up or down arrow. (It has no effect on values that the user types).

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
 CLX Reference

MessageDlg function

See also 	Example

Displays a message dialog box in the center of the screen.

Unit

QDialogs

Category

dialog and message routines

function MessageDlg(const Msg: WideString; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint; DefaultBtn: TMsgDlgBtn = mbNone; Bitmap: TBitmap = nil): Integer; overload;

function MessageDlg(const Caption: WideString; const Msg: WideString; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint; DefaultBtn: TMsgDlgBtn = mbNone; Bitmap: TBitmap = nil): Integer; overload;

function MessageDlg(const Caption: WideString; const Msg: WideString; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint; X, Y: Integer; DefaultBtn: TMsgDlgBtn = mbNone; Bitmap: TBitmap = nil): Integer; overload;

function MessageDlg(const Caption: WideString; const Msg: WideString; DlgType: TMsgDlgType; Button1, Button2, Button3: TMsgDlgBtn; HelpCtx: Longint; X, Y: Integer; DefaultBtn: TMsgDlgBtn = mbNone; Bitmap: TBitmap = nil): Integer; overload;

Description

Call MessageDlg to bring up a message box and obtain the user's response.

Caption specifies the caption for the message box when DlgType is mtCustom. If this parameter is not used (the first syntax), the caption for custom message boxes is the title of the application.

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. Note that if you want to use a three button message box, you can use the last syntax instead, and control the order in which the buttons appear.

Button1, Button2, and Button3 indicate what types of buttons to use for a three button message box. The resulting buttons appear in order.

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. A value of –1 means that the message box can appear anywhere in the specified dimension.

DefaultBtn specifies which button from among those specified by Buttons (or Button1, Button2, and Button3) is the default button for the dialog. If DefaultBtn is mbNone, there is no default button.

Bitmap is an image that appears on the face of the message dialog. If Bitmap is nil, there is no image unless DlgType is mtConfirmation.

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


MessageDlgPos function
 CLX Reference

MessageDlgPos function

See also 	Example

Displays a message dialog box at the specified screen coordinates.

Unit

QDialogs

Category

dialog and message routines

function MessageDlgPos(const Msg: WideString; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint; X, Y: Integer; DefaultBtn: TMsgDlgBtn = mbNone; Bitmap: TBitmap = nil): Integer;

Description

Call MessageDlgPos to bring up a message box at a particular location when you do not need to specify a caption. (If you need to specify the caption as well, use the MessageDlg function).

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. A value of –1 means that the message box can appear anywhere in the specified dimension.

DefaultBtn specifies which button from among those specified by Buttons is the default button for the dialog. If DefaultBtn is mbNone, there is no default button.

Bitmap is an image that appears on the face of the message dialog. If Bitmap is nil, there is no image unless DlgType is mtConfirmation.

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


SelectDirectory function
 CLX Reference

SelectDirectory function

See also

Displays a dialog in which the user can select a directory name.

Unit

QDialogs

Category

dialog and message routines

function SelectDirectory(const Caption: WideString; const Root: string; var Directory: string): Boolean;

function SelectDirectory(const Caption: string; const Root: WideString; out Directory: string): Boolean;

Description

Call SelectDirectory to let the user enter a directory name. SelectDirectory does not change the value of the current directory.

Note:	SelectDirectory uses a slightly different syntax when compiled for Linux (first syntax) or Windows (second syntax). In most instances, the same code can be used with either compiler, because the compiler handles the implied typecast to string or WideString.

Caption specifies a caption for the dialog.

Root specifies the root directory from which to browse.

Directory returns the selected directory.

Warning:	You can’t use the same variable for the Root parameter and the Directory parameter.


ShowMessage procedure
 CLX Reference

ShowMessage procedure

See also 	Example

Displays a message box with an OK button.

Unit

QDialogs

Category

dialog and message routines

procedure ShowMessage(const Msg: WideString); overload;

procedure ShowMessage(const Msg: WideString; Params: array of const); overload;

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.

Params lists the values to insert into Msg if the Msg string includes formatting specifiers. For more information about how messages are formatted, see Format Strings.

Note:	To display a message in a message box with other buttons, or with an icon, use the MessageDlg function.


ShowMessageFmt procedure
 CLX Reference

ShowMessageFmt procedure

See also

Displays a message box with a formatted message.

Unit

Category

dialog and message routines

procedure ShowMessageFmt(const Msg: WideString; 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.


ShowMessagePos procedure
 CLX Reference

ShowMessagePos procedure

See also

Displays a message box at a specified location.

Unit

Category

dialog and message routines

procedure ShowMessagePos(const Msg: WideString; 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. A value of –1 means that the message box can appear anywhere in the specified dimension.

To display a message in a message box with other buttons, or with an icon, use the MessageDlg function.


GReferenceExpandable variable
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

IsPropertyInCategory function

See also

Indicates whether a property is in a specific property category.

Unit

PropertyCategories

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.


Frame3D procedure
 CLX Reference

Frame3D procedure

See also

Draws a three dimensional frame on a canvas.

Unit

QExtCtrls

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
 CLX Reference

Application variable

See also 	Example

Represents application-level information.

Unit

QForms

Category

application-level information

var Application: TApplication;

Description

By default, when a new project is created, Kylix constructs an application object and assigns it to the Application variable in the QForms unit. Application has several properties that can be used to get information about an application while it runs.


GetParentForm function
 CLX Reference

GetParentForm function

See also

Returns the form that contains a specified control.

Unit

QForms

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 CLX form, GetParentForm returns nil.


HintWindowClass variable
 CLX Reference

HintWindowClass variable

See also

Specifies the class for the window used to display help hints.

Unit

QForms

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
 CLX 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

Category

miscellaneous routines

WideStringDescription

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
 CLX Reference

Screen variable

See also 	Example

Represents a screen device.

Unit

QForms

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  about the current screen device and assign it to Screen.


ValidParentForm function
 CLX Reference

ValidParentForm

See also

Returns the form or property page that contains a specified control.

Unit

QForms

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.


ColorToIdent function
 CLX Reference

ColorToIdent function

See also

Provides the symbolic name of a TColor value.

Unit

QGraphics

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
 CLX Reference

ColorToRGB function

See also 	Example

Converts a TColor value into an RGB representation of the color.

Unit

QGraphics

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
 CLX Reference

ColorToString function

See also

Returns a string that represents the name of a TColor value.

Unit

QGraphics

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 clHighlightText), ColorToString returns the name of the constant. Otherwise, ColorToString returns the hex value of the color, formatted as a string such as '$02FF8800'.


GetColorValues procedure
 CLX Reference

GetColorValues procedure

See also

Passes the name of every predefined color constant to a callback function.

Unit

QGraphics

Category

graphics utilities

procedure GetColorValues(Proc: TGetStrProc);

Description

Call GetColorValues to execute a callback for every TColor constant.  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.


GraphicExtension function
 CLX Reference

GraphicExtension function

See also	Example

Returns the default file-name extension of a graphics object.

Unit

QGraphics

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 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

TDrawing	ddw

If custom graphics classes register a file extension, GraphicExtension will return that extension when passed the custom graphics class as an argument.


GraphicFileMask function
 CLX Reference

GraphicFileMask function

See also

Returns a file mask that specifies the valid extensions for a graphic class.

Unit

QGraphics

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, TDrawing, 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;*.png;*.xpm

TIcon	*.ico

TDrawing	*.ddw

TGraphic	*.ddw;*.bmp;*.png;*.xpm*.ico


GraphicFilter function
 CLX Reference

GraphicFilter function

See also	Example

Returns a file filter compatible with the Filter property of an Open or Save dialog.

Unit

QGraphics

Category

graphics utilities

function GraphicFilter(GraphicClass: TGraphicClass; AllFilter: Boolean = True): string;

Description

Call GraphicFilter to obtain a value for the Filter property of an Open or Save dialog box. The GraphicClass parameter can specify one of these values: TBitmap, TGraphic, TIcon, TDrawing, or a user-defined descendant of TGraphic.

These are the strings that are returned for each built-in graphics class when the AllFilter parameter is Ttrue. (When AllFilter is Ffalse, the section labelled ‘All’ is omitted):

Graphic class	Filter string returned

TBitmap	Bitmaps (*.bmp;*.png;*.xpm)|*.bmp;*.png;*.xpm

TIcon	Icons (*.ico)|*.ico

TDrawing	Drawings (*.ddw)|*.ddw

TGraphic	All (*.ddw;*.bmp;*.png;*.xpm*.ico)|*.ddw;*.bmp;*.png;*.xpm*.ico|Drawings (*.ddw)|*.ddw|Bitmaps (*.bmp;*.png;*.xpm)|*.bmp;*.png;*.xpm|Icons (*.ico)|*.ico


IdentToColor function
 CLX Reference

IdentToColor function

See also

Translates the name of a color constant to the corresponding TColor value.

Unit

QGraphics

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.


MulDiv function
 CLX Reference

MulDiv function

Peforms a specified integer multiplication followed by a specified integer division.

Unit

QGraphics

Category

arithmetic routines

function MulDiv(Number, Numerator, Denominator: Integer): Integer;

Description

MulDiv returns the result from multiplying Number by Numerator and then (integer) dividing by Denominator. If Denominator is 0, MulDiv returns –1.


StringToColor function
 CLX Reference

StringToColor function

See also

Translates a string representation of a color to the corresponding TColor value.

Unit

QGraphics

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 'clBtnText', 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.


 CLX Reference


CopyQStringListToTStrings function
 CLX Reference

CopyQStringListToTStrings procedure

See also

Copies the contents of a Qt QStringList to a TStrings object.

Unit

QTypes

Category

Qt / CLX conversion routines

procedure CopyQStringListToTStrings(Handle: QStringListH; Strings: TStrings);

Description

CopyQStringListToTStrings copies the contents of a Qt QString list Object to a CLX TStrings object. CopyQStringListToTStrings take a typed pointer to a QStringList as the source object and a TStrings object as the destination object.


QStringListToTStringList function
 CLX Reference

QStringListToTStringList function

See also

Converts a Qt QStringList to a TStringList object.

Unit

QTypes

Category

Qt / CLX conversion routines

function QStringListToTStringList(Handle: QStringListH): TStringList;

Description

Use QStringListToTStringList to convert a QT QStringList object to a CLX TStringList object. QStringListToTStringList takes a pointer to a QStringList object and returns a TStringList object that contains the contents of the QStringList object. Use QStringListToTStringList when making low-level function calls into the Qt shared libraries where the function call returns a pointer to a QStringList object and it is necessary to convert the QStringList Object to a CLX TStringList object. Atfer you are done with the TStringList returned from QStringListToTStringList, the TStringList should be freed.


TStringsToQStringList function
 CLX Reference

TStringsToQStringList function

See also

Converts of a TStrings object to a Qt QStringList object.

Unit

QTypes

Category

Qt / CLX conversion routines

function TStringsToQStringList(Strings: TStrings): QStringList;;

Description

Use TStringsToQStringList to convert a CLX TStrings object to a QT QStringList object. TStringsToQStringList takes a TStrings object and returns a typed pointer to a QT QStringList that contains the contents of the TStrings object. Use TStringsToQStringList when making low-level function calls into the Qt shared libraries where the function call requires a pointer to a QStringList object.


IODeviceFromStream function
 CLX Reference

IODeviceFromStream function

See also

Converts a TStream object to a Qt QIOStream object.

Unit

QTypes

Category

Qt / CLX conversion routines

function IODeviceFromStream(const Stream: TStream; Owned: Boolean = False): QIODeviceH;

Description

Use IODeviceFromStream to convert a CLX TStream object to a QT QIODevice object. IODeviceFromStream takes a TStream object and returns a typed pointer to a QIODevice that contains the contents of the TStream object. Use IODeviceFromStream when making low-level function calls into the Qt shared libraries where the function call requires a pointer to a QIODevice object.


FormatMaskText function
 CLX Reference

FormatMaskText function

See also

Returns a string formatted using an edit mask.

Unit

MaskUtils

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, 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.


ArcCos function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

IfThen function

Conditionally returns one of two specified values.

Unit

Math

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;

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

RandomFrom function

See also

Returns a randomly selected element from an array.

Unit

Math

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;

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


SinCos procedure
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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).


Global Routines
 CLX Reference

Routines

Please see the Help table of contents for a complete categorical listing of CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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

In the Linux environment, the AllocMemCount variable is not maintained by default. Unless it is updated by a third-party memory manager, this variable always returns zero.


AllocMemSize variable
 CLX Reference

AllocMemSize variable

See also

Represents the total size of allocated memory blocks.

Unit

System

Category

memory management routines

var AllocMemSize: Integer;

Description

In the Linux environment, AllocMemSize is not maintained by default. Unless it is updated by a third-party memory manager, this variable always returns zero.


AnsiToUtf8 function
 CLX 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
 CLX 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 F was not assigned a name, then, after the call to Append, F refers to the standard output file.


ArcTan function
 CLX 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
 CLX 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
 CLX Reference

AssertErrorProc variable

See also

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
 CLX 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
 CLX 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
 CLX Reference

BeginThread function

See also

Spawns a separate thread of execution.

Unit

System

Category

thread management routines

function BeginThread(Attribute: PThreadAttr; ThreadFunc: TThreadFunc; Parameter: Pointer; var ThreadId: Cardinal): Integer;

Description

Use this routine or a TThread object to spawn separate threads of execution. BeginThread 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 0 if the thread is successfully spawned, an error code otherwise.


BlockRead procedure
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

Note:	{$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.


Chr function
 CLX Reference

Chr function

See also

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
 CLX 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 or Kylix, 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
 CLX 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
 CLX 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

On Windows, 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.

On Linux, CmdLine contains a nil pointer.


CmdShow variable
 CLX Reference

CmdShow variable

CmdShow always returns 0.

Unit

System

Category

application-level information

var CmdShow: Integer;

Description

CmdShow, which exists for compatibility with other versions of the VCL, always returns 0.


CompToCurrency function
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

Continue procedure

See also

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
 CLX Reference

Copy function

See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


DoubleToComp function
 CLX 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
 CLX Reference

EndThread function

See also

Terminates the execution of a thread.

Unit

System

Category

thread management routines

procedure EndThread(ExitCode: Integer);

Description

EndThread terminates execution of a thread with the specified ExitCode.


EnumModules procedure
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

 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 CLX-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
 CLX 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.


ExceptAddr function
 CLX 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
 CLX 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
 CLX 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);

Note:	On Linux, ExceptProc may be called when most of the RTL has already shut down. This happens if an application terminates with an unhandled exception.


Exclude procedure
 CLX 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
 CLX Reference

Exit procedure

See also

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
 CLX 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.


ExitProc variable
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 CLX 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 instance handle 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

GetDir procedure

See also	Example

Returns the current working directory.

Unit

System

Category

file management routines

procedure GetDir(D: Byte; var S: string);

Description

GetDir returns the current working directory using the S parameter. The first parameter (maintained for compatibility with other versions of the VCL) is ignored.


GetLastError function
 CLX 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;

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
 CLX 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
 CLX 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.


GetModuleFileName function
 CLX Reference

GetModuleFileName function

Returns the fully qualified name for a module, given its handle.

Unit

System

Category

miscellaneous routines

function GetModuleFileName(Module: HMODULE; Buffer: PChar; BufLen: Integer): Integer;

Description

Call GetModuleFileName to obtain the fully qualified name of a module, given its handle. This function is not available on Windows.

Module is the handle of the module whose file name is required.

Buffer is a buffer that receives the file name.

BufLen is the number of bytes in Buffer.

GetModuleFileName returns the number of bytes written to Buffer.


GetVariantManager procedure
 CLX 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
 CLX 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 an application, call Application.Terminate. Exitcode is an optional expression that specifies an exit code for the program.


Hi function
 CLX 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
 CLX 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
 CLX Reference

HInstance variable

See also

The handle for a module.

Unit

SysInit

Category

application-level information

var HInstance: LongWord;

Description

HInstance provides a unique instance handle for the application or library.


Inc procedure
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


IsLibrary variable
 CLX Reference

IsLibrary variable

See also

Indicates whether the module is a shared library.

Unit

System

Category

application-level information

var IsLibrary: Boolean;

Description

The IsLibrary variable is True if the module is a shared library.


IsMemoryManagerSet function
 CLX 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
 CLX 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 in order to allow the memory manager to execute safely if a CLX 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
 CLX 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
 CLX 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. JITEnable only has an effect on applications that run under Windows.

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 Kylix or 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 Kylix or 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 Kylix or Delphi IDE.


Length function
 CLX 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 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
 CLX 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;

    InstanceVar: Pointer platform;

    GOT: LongWord platform;

    CodeSegStart: LongWord platform;

    CodeSegEnd: LongWord platform;

    InitTable: Pointer platform;

  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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 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 Kylix shared object from a non-Kylix executable.


MainThreadID variable
 CLX 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).

During debugging, this ID appears in the thread status box for the main thread.


MaxInt constant
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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

NoErrMsg only has an effect for applications that run under Windows.

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
 CLX 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.


Ord function
 CLX 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
 CLX 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


ParamCount function
 CLX 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
 CLX 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 command used to execute the program, without parameters (for example, ./myprogram). This behavior is dependent on information returned by the shell program and may not be consistent among all shells.

Note:	Use double quotes to wrap multiple words as one parameter (such as long file names containing spaces).


Pi function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

Note:	{$I+} handles run-time errors using exceptions.  When using {$I-}, use IOResult to check for I/O errors.


ReallocMem procedure
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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'.


StringToWideChar function
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

SysFreeMem function

See also

Frees the memory pointed to by a specified pointer.

Unit

System

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.


SysGetMem function
 CLX Reference

SysGetMem function

See also

Allocates a specified number of bytes and returns a pointer to them.

Unit

System

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. The memory is reference-counted and can be shared with other processes.


SysReallocMem function
 CLX 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

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.

P and the return value point to memory that can be shared with other processes.


Trunc function
 CLX 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
 CLX 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
 CLX 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
 CLX 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. UCS4 strings are returned by some Linux operating system calls.


UnicodeToUtf8 function
 CLX 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; Source: PWideChar; MaxBytes: Integer): Integer;

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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; Source: PChar; MaxChars: Integer): Integer;

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


WideCharLenToStrVar procedure
 CLX 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
 CLX 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.


WideCharToStrVar procedure
 CLX 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
 CLX 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
 CLX 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)
 CLX 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)
 CLX 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
 CLX 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 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.


Abort procedure
 CLX 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
 CLX 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 CLX package support and is provided for backward compatibility only. Do not use AddExitProc in new applications.


AddTerminateProc procedure
 CLX 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.


AdjustLineBreaks function
 CLX Reference

AdjustLineBreaks function

See also

Adjust line break characters to Windows or Linux style.

Unit

SysUtils

Category

string handling routines

function AdjustLineBreaks(const S: string; Style: TTextLineBreakStyle = {$IFDEF LINUX} tlbsLF {$ENDIF} {$IFDEF MSWINDOWS} tlbsCRLF {$ENDIF} ): string;

Description

AdjustLineBreaks returns a text string with its line breaks adjusted to fit a specified style. Depending on the value of Style, S is returned with all line breaks adjusted to be CR-LF sequences (Windows style line breaks) or single LF characters (Linux style line breaks). If Style is omitted, the style for the compile target is used.


AnsiCompareFileName function
 CLX 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 two file names. The current locale controls the compare operation. Comparison is case-insensitive under Windows, case-sensitive under Linux.

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 Windows locales that do not use MBCS, AnsiCompareFileName is identical to AnsiCompareText. Under Linux, AnsiCompareFileName is identical to AnsiCompareStr.


AnsiCompareStr function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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. If the compile target is Windows and SysLocale.FarEast is true, AnsiLowerCaseFileName supports file names that use Zenkaku encoding. When used with other locales or compiled for a Linux target, AnsiLowerCaseFileName is identical to AnsiLowerCase.


AnsiPos function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 lower case. If the compile target is Windows and SysLocale.FarEast is true, AnsiUpperCaseFileName supports file names that use Zenkaku encoding. When used with other locales or compiled for a Linux target, AnsiUpperCaseFileName is identical to AnsiUpperCase.


AppendStr procedure
 CLX 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
 CLX 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
 CLX Reference

Beep procedure

Generates a message beep.

Unit

SysUtils

Category

miscellaneous routines

procedure Beep;

Description

Beep generates a conventional message beep. To minimize library dependencies in the run time library, the SysUtils version of Beep has limited Linux functionality. For cross-platform GUI applications, use the QControls version of Beep instead.


BoolToStr function
 CLX Reference

BoolToStr function

See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

CompareText function

See also

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.


CreateGUID function
 CLX Reference

CreateGUID function

Creates a globally unique identifier.

Unit

SysUtils

Category

interface support routines

function CreateGUID(out Guid: TGUID): HResult;

Description

CreateGUID sets Guid to a new-created Globally Unique Identifier. Under Windows, CreateGUID is simply an import of the Windows API CoCreateGUID. Under Linux, CreateGUID calls uuid_generate_time.


CreateDir function
 CLX Reference

CreateDir function

See also

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
 CLX 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. These variables are set automatically from the locale definition files. 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.

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 $

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 $)

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.

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.

CurrencyDecimals	CurrencyDecimals is the number of digits to the right of the decimal point in a currency amount.

DateSeparator	DateSeparator is the character used to separate the year, month, and day parts of a date value.

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.

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.

TimeSeparator	TimeSeparator is the character used to separate the hour, minute, and second parts of a time value.

TimeAMString	TimeAMString is the suffix string used for time values between 00:00 and 11:59 in 12-hour clock format.

TimePMString	TimePMString is the suffix string used for time values between 12:00 and 23:59 in 12-hour clock format.

ShortTimeFormat	ShortTimeFormat is the format string used to convert a time value to a short string with only hours and minutes.

LongTimeFormat	LongTimeFormat is the format string used to convert a time value to a long string with hours, minutes, and seconds.

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.

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.

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.

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.

SysLocale	Indicates the locale used by FormatDateTime to interpret dates.

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.


CurrentYear function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 CLX, 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
 CLX 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
 CLX 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.


DateTimeToTimeStamp function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

DirectoryExists function

See also	Example

Determines whether a specified directory exists.

Unit

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.


DisposeStr procedure
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 ('\' on Windows, '/' on Linux) removed. This function is included for backward compatibility only. New programs should use ExcludeTrailingPathDelimiter.

Note:	ExcludeTrailingBackslash works with multibyte character sets.


ExcludeTrailingPathDelimiter function
 CLX 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 ('\' on Windows, '/' on Linux) 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
 CLX 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.


ExpandFileNameCase function
 CLX Reference

ExpandFileNameCase function

See also

Returns the full path name for a case-insensitive relative file name.

Unit

SysUtils

Category

file name utilities

TFilenameCaseMatch = (mkNone, mkExactMatch, mkSingleMatch, mkAmbiguous);

function ExpandFileNameCase(const FileName: string; out MatchFound: TFilenameCaseMatch): string;

Description

ExpandFileNameCase expands a relative file name like ExpandFileName, but actually attempts to find the file, or a close case-insensitive match. This is useful when converting file name data from case-insensitive conventions (Windows) to case-sensitive conventions (Linux). It is also useful for validating file names entered by users unfamiliar with Linux conventions.

The MatchFound argument returns the results of the file search:

mkNone	No actual file matches the file name. The return value is the fully qualified path name, as returned by ExpandFileName.

mkExactMatch	A single file matches the file name. The return value is the fully qualified path name, as returned by ExpandFileName.

mkSingleMatch	(Linux only.) No file matches the file name, but a single match can be found by ignoring differences in case. The return value is the fully qualified path name for the actual file name, not the specified file name.

mkAmbiguous	(Linux only.) No file matches the file name, but two or more matches can be found by ignoring differences in case. (In many cases this should be considered an error.) The return value is the fully qualified path name for one of the matched file names. This path name is not the same as the specified file, and not necessarily the closest match.

Note:	ExpandFileNameCase is significantly slower than ExpandFileName, particularly when the specified file name is ambiguous or does not match an actual file.


ExpandUNCFileName
 CLX 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

On Windows, 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".

On Linux, ExpandUNCFileName is always equivalent to ExpandFileName.


ExtractFileDir function
 CLX 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
 CLX 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

On Windows, 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.On Linux, ExtractFileDrive always returns a zero-length string.


ExtractFileExt function
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


FalseBoolStrs variable
 CLX 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
 CLX Reference

FileAge function

See also

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
 CLX 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
 CLX Reference

FileCreate function

See also	Example

Creates a new file.

Unit

SysUtils

Category

file management routines

function FileCreate(const FileName: string): Integer; overload;

function FileCreate(const FileName: string; Rights: Integer): Integer; overload;

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.

On Linux, a file has a set of permission bits controlling access to the file. The first form of FileCreate takes the permission bits from the global FileAccessRights variable. The second form takes the permission bits from the Rights parameter. In either case, the permission bits are masked by the current process's umask value.

On Windows, the FileAccessRights variable and Rights parameter are ignored.


FileDateToDateTime function
 CLX Reference

FileDateToDateTime function

See also

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 CLX 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
 CLX 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.


FileGetDate function
 CLX 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
 CLX 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
 CLX 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

{$IFDEF LINUX}

  fmOpenRead       = O_RDONLY;

  fmOpenWrite      = O_WRONLY;

  fmOpenReadWrite  = O_RDWR;

  fmShareExclusive = $0010;

  fmShareDenyWrite = $0020;

  fmShareDenyNone  = $0030;

{$ENDIF}

{$IFDEF MSWINDOWS}

  fmOpenRead       = $0000;

  fmOpenWrite      = $0001;

  fmOpenReadWrite  = $0002;

  fmShareCompat    = $0000 platform;

  fmShareExclusive = $0010;

  fmShareDenyWrite = $0020;

  fmShareDenyRead  = $0030 platform;

  fmShareDenyNone  = $0040;

{$ENDIF}

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. Do not use this mode in cross-platform applications.

fmShareExclusive	Read and write access is denied.

fmShareDenyWrite	Write access is denied.

fmShareDenyRead	Read access is denied. Do not use this mode in cross-platform applications.

fmShareDenyNone	Allows full access for others.


FileOpen function
 CLX 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
 CLX 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
 CLX 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 list of path names delimited by semicolons on Windows, colons on Linux). 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
 CLX 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.


FileSetDate function
 CLX 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.


FileSetReadOnly function
 CLX Reference

FileSetReadOnly function

Sets the file permissions to read-only.

Unit

SysUtils

Category

file management routines

function FileSetReadOnly(const FileName: string; ReadOnly: Boolean): Boolean;

Description

FileSetReadOnly attempts to set the readonly status of FileName. On Windows, the ReadOnly parameter is assigned to the file's readonly flag. On Linux, the inverse of the ReadOnly parameter is assigned to the file's user write, group write, and other write permission bits. The active user must have permission to perform these operations.

FileSetReadOnly is designed to support cross-platform code. To manipulate permissions more specifically than FileSetReadOnly allows, use platform-specific functions.

FileSetReadOnly returns True if the operation was successful and False if an error occurred.


FileWrite function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

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.

Note:	Some of the file attribute constants are not valid on all platforms. For example, faVolumneID and faArchive will not work on Linux.


FindNext function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

ForceDirectories function

See also	Example

Creates a new directory, also creating parents as needed.

Unit

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.


Format function
 CLX 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
 CLX 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. 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.
,	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.
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
 CLX 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
 CLX 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
 CLX Reference

GetEnvironmentVariable function

Returns environment variable value..

Unit

SysUtils

Category

miscellaneous routines

GetEnvironmentVariable(Name: string): string;

Description

GetEnvironmentVariable returns the value of the Windows or Linux environment variable indicated by Name.


GetFormatSettings procedure
 CLX 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.


GetPackageDescription function
 CLX 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
 CLX 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
 CLX 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 on Windows, an EOleSysError exception is raised with an error code indicating the cause of the error.


IncAMonth procedure
 CLX 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
 CLX 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 ('\" on Windows, '/' on Linux). This function is included for backward-compatibility only. New programs should use IncludeTrailingPathDelimiter.

Note:	IncludeTrailingBackslash works with multibyte character sets.


IncludeTrailingPathDelimiter function
 CLX 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 ('\" on Windows, '/' on Linux). 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
 CLX 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.


InterlockedDecrement function
 CLX Reference

InterlockedDecrement function

See also

Thread-safe variable decrement.

Unit

SysUtils

Category

thread management routines

function InterlockedDecrement(var I: Integer): Integer;

Description

InterlockedDecrement increments I in such a way that other threads cannot access or I until the operation is complete. The return value of InterlockedDrecrement has the same sign as the decremented result, but not necessarily the exact same value.


InterlockedExchange function
 CLX Reference

InterlockedExchange function

See also

Thread-safe variable exchange.

Unit

SysUtils

Category

thread management routines

function InterlockedExchange(var A: Integer; B: Integer): Integer;

Description

InterlockedExchange exchanges the values of A and B in such a way that other threads cannot access either variable until the operation is complete. The return value of InterlockedExchange is the new value of B.


InterlockedExchangeAdd function
 CLX Reference

InterlockedExchangeAdd function

See also

Thread-safe addition.

Unit

SysUtils

Category

thread management routines

function InterlockedExchangeAdd(var A: Integer; B: Integer): Integer;

Description

InterlockedExchangeAdd adds B to A in such a way that other threads cannot access either variable until the operation is complete. The return value of InterlockedExchangeAdd is the old value of A.


InterlockedIncrement function
 CLX Reference

InterlockedIncrement function

See also

Thread-safe variable increment.

Unit

SysUtils

Category

thread management routines

function InterlockedIncrement(var I: Integer): Integer;

Description

InterlockedIncrement increments I in such a way that other threads cannot access or I until the operation is complete. The return value of InterlockedDrecrement has the same sign as the incremented result, but not necessarily the exact same value.


InitializePackage procedure
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


IsEqualGUID function
 CLX Reference

IsEqualGUID function

Indicates whether two TGUIDs are the same.

Unit

SysUtils

Category

interface support routines

function IsEqualGUID(const guid1, guid2: TGUID): Boolean;

IsEqualGUID returns True if the TGUID values are equal.


IsLeapYear function
 CLX 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
 CLX 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 ('/' on Linux, '\' on Windows). 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
 CLX 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', '_'].


LastDelimiter function
 CLX 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
 CLX 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
 CLX 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
 CLX 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 .so. 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

Note:	Although TDateTime values can represent milliseconds, Now only returns the time to the closest second.


NullStr constant
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


RemoveDir function
 CLX 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
 CLX 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
 CLX 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
 CLX 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)


SameFileName function
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


Sleep procedure
 CLX Reference

Sleep procedure

Delay program execution for a specified number of microseconds.

Unit

SysUtils

Category

program control

procedure Sleep(milliseconds: Cardinal);{$IFDEF MSWINDOWS} stdcall; {$ENDIF}

Description

Sleep pauses program executions as specified by the millseconds parameter. Under Windows, Sleep is just a link to the Sleep function in the system API. Under Linux, Sleep calls the usleep library routine.


StrAlloc function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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. Under Windows, the return value is either 1 or 2. Under Linux, the return value is from 1 to 6.


StrComp function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

StrNew function

See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

StrRScan function

See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

StrToDateTime function

See also

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
 CLX Reference

StrToFloat function

See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


HoursPerDay constant;MinsPerDay constant;SecsPerDay constant;MSecsPerDay constant
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


WideCompareStr function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 sLineBreak (#13#10 on Windows, #10 on Linux) 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.', #10, ['.',' ',#9,'-'], 42);

The result:

The rain in Spain falls mainly on the

plain.


Bounds function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


DynArrayFromVariant procedure
 CLX 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
 CLX 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
 CLX Reference

EmptyParam function

See also

Returns an OleVariant that represents an unused optional parameter.

Unit

Variants

Category

variant support routines

function EmptyParam: OleVariant;

Description

EmptyParam can be used for Variants that represent optional parameters whose value is unassigned. This is useful when the code that marshals method calls requires a fixed number of parameters, even if some of them are optional.


FindCustomVariantType function
 CLX 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
 CLX 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
 CLX Reference

Unassigned constant

See also

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..


VarArrayCreate function
 CLX 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.


VarArrayDimCount function
 CLX 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.


VarArrayHighBound function
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


VarArrayRef function
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


VarCopyNoInd procedure
 CLX 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
 CLX Reference

VarDispProc variable

See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


VarSupports function
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 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.

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
 CLX 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
 CLX 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
 CLX Reference

 TSaveDialog

Hierarchy	Properties	Methods	Events	See also

TSaveDialog displays a "Save As" dialog for saving files.

Unit

QDialogs

Description

TSaveDialog displays a modal  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.

Note:	The Save button is labeled ‘Open’ if there is no file name assigned in the dialog.


 CLX Reference

TSaveDialog properties

TSaveDialog	Alphabetically	Legend

Derived from TOpenDialog

DefaultExt

FileName

Files

Filter

FilterIndex

Handle

HistoryList

InitialDir

Options

In TQtDialog

NativeFlags

UseNativeDialog

Derived from TDialog

Height

HelpContext

HelpKeyword

HelpType

Position

Title

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TSaveDialog properties

TSaveDialog	By object	Legend

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DefaultExt

DesignInfo

FileName

Files

Filter

FilterIndex

Handle

Height

HelpContext

HelpKeyword

HelpType

HistoryList

InitialDir

Name

Options

Owner

Position

Tag

Title

Width


 CLX Reference

TSaveDialog events

TSaveDialog	Alphabetically	Legend

Derived from TOpenDialog

OnCanClose

OnFileAdd

OnFolderChange

OnSelected

Derived from TDialog

OnClose

OnShow


 CLX Reference

TSaveDialog events

TSaveDialog	By object	Legend

OnCanClose

OnClose

OnFileAdd

OnFolderChange

OnSelected

OnShow


 CLX Reference

TSaveDialog methods

TSaveDialog	Alphabetically	Legend

In TSaveDialog

Create

Derived from TOpenDialog

Destroy

Refresh

Derived from TDialog

Execute

Derived from THandleComponent

HandleAllocated

HandleNeeded

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

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


 CLX Reference

TSaveDialog methods

TSaveDialog	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleAllocated

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSaveDialog.Create
 CLX Reference

TSaveDialog.Create

TSaveDialog	See also

Creates and initializes a TSaveDialog instance.

constructor Create(AOwner: TComponent); override;

Description

The Create method generates a TSaveDialog 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 sets the Title to "Save As"


Hierarchy

TObject

TPersistent

TComponent

TDialog

TQtDialog

TOpenDialog

TSaveDialog


TScreen
 CLX Reference

TScreen

Hierarchy	Properties	Methods	Events	See also

TScreen represents the state of the screen in which an application runs.

Unit

QForms

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.

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.


 CLX Reference

TScreen properties

TScreen	Alphabetically	Legend

In TScreen

ActiveControl

ActiveCustomForm

ActiveForm

ActiveWidget

Cursor

Cursors

CustomFormCount

CustomForms

DataModuleCount

DataModules

Fonts

FormCount

Forms

Height

HintFont

PixelsPerInch

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag


 CLX Reference

TScreen properties

TScreen	By object	Legend

ActiveControl

ActiveCustomForm

ActiveForm

ActiveWidget

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Cursor

Cursors

CustomFormCount

CustomForms

DataModuleCount

DataModules

DesignInfo

Fonts

FormCount

Forms

Height

HintFont

Name

Owner

PixelsPerInch

Tag

Width


TScreen.ActiveControl
 CLX Reference

TScreen.ActiveControl

TScreen	See also

Indicates which control currently has input focus on the screen.

property ActiveControl: TWidgetControl;

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
 CLX 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
 CLX 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 find or replace dialog), it will not appear as ActiveForm. To handle such cases, use the ActiveCustomForm property instead.


TScreen.ActiveWidget
 CLX Reference

TScreen.ActiveWidget

TScreen	See also

Returns the handle of the form specified in the ActiveForm property.

property ActiveWidget: QWidgetH;

Description

Read ActiveWidget to obtain the widget handle for the window specified in the ActiveForm property. This handle can be used when making low-level function calls into the QT shared libraries, where the function call requires an instance pointer to a QWidget object.


TScreen.Cursor
 CLX 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.

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
 CLX Reference

TScreen.Cursors

TScreen	See also

Lists the cursors available to the application.

property Cursors[Index: Integer]: QCursorH;

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.


TScreen.CustomFormCount
 CLX Reference

TScreen.CustomFormCount

TScreen	See also	Example

Indicates the number of forms displayed on the screen.

property CustomFormCount: Integer;

Description

Read CustomFormCount to learn the number of TCustomForm descendants 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 in an application.


TScreen.CustomForms
 CLX Reference

TScreen.CustomForms

TScreen	See also 	Example

Lists all the forms that are currently displayed in the application.

property CustomForms[Index: Integer]: TCustomForm;

Description

Use CustomForms to access a form 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 TReplaceDialog).

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
 CLX 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
 CLX 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.Fonts
 CLX 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
 CLX 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
 CLX 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.

Forms only lists the TForm descendants in the application. This does not include, for example, the find or replace dialog. 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
 CLX 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
 CLX Reference

TScreen.HintFont

TScreen	See also

Specifies the font used to display help hints.

property HintFont: TFont;

Description

 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.PixelsPerInch
 CLX 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
 CLX 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.


 CLX Reference

TScreen events

TScreen	Alphabetically	Legend

In TScreen

OnActiveControlChange

OnActiveFormChange


 CLX Reference

TScreen events

TScreen	By object	Legend

OnActiveControlChange

OnActiveFormChange


TScreen.OnActiveControlChange
 CLX 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
 CLX 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.


 CLX Reference

TScreen methods

TScreen	Alphabetically	Legend

In TScreen

Create

Destroy

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


 CLX Reference

TScreen methods

TScreen	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

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

SetSubComponent

UpdateAction


TScreen.Create
 CLX 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
 CLX 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 CLX objects use screen.


Hierarchy

TObject

TPersistent

TComponent

TScreen


TScrollBar
 CLX Reference

 TScrollBar

Hierarchy	Properties	Methods	Events	Using TScrollBar	See also

TScrollBar is a scroll bar, which is used to scroll the contents of a window, form, or control.

Unit

QStdCtrls

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.


 CLX Reference

TScrollBar properties

TScrollBar	Alphabetically	Legend

In TScrollBar

Handle

Kind

LargeChange

Max

Min

Position

SmallChange

Track

Derived from TWidgetControl

Bitmap

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TScrollBar Properties

TScrollBar	By Object	Legend

Action

Align

Anchors

Bitmap

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Kind

LargeChange

Left

Max

Min

Name

Owner

Parent

ParentColor

ParentShowHint

ParentWidget

PopupMenu

Position

ShowHint

Showing

SmallChange

TabOrder

TabStop

Tag

Top

Track

Visible

Width


TScrollBar.Handle
 CLX Reference

TScrollBar.Handle

TScrollBar

Returns a unique 4-byte identifier that represents the instance of the underlying widget.

property Handle: QScrollBarH;

Description

Use Handle to return a typed pointer to the instance of the underlying QScrollBar object. This Handle can be used when making low-level function calls into the QT shared libraries, where the function call requires an instance pointer to a QScrollBar object.


TScrollBar.Kind
 CLX 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
 CLX 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
 CLX 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
 CLX 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.Position
 CLX 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
 CLX 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.


TScrollBar.Track
 CLX Reference

TScrollBar.Track

TScrollBar	See also

Determines whether an OnScroll event is generated as the user moves the thumb tab.

property Track: Boolean;

Description

Use Track to specify whether an OnScroll event is generated as the user moves the thumb tab. If Track is set toTrue, an OnScroll event is generated whenever the slider is being dragged. If Track is set to False, the OnScroll event is only generated when the user releases the mouse button (unless the value happens to be the same as before).


 CLX Reference

TScrollBar events

TScrollBar	Alphabetically	Legend

In TScrollBar

OnChange

OnScroll

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnStartDrag


 CLX Reference

TScrollBar Events

TScrollBar	By Object	Legend

OnChange

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnScroll

OnStartDrag


TScrollBar.OnChange
 CLX 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
 CLX 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.


 CLX Reference

TScrollBar methods

TScrollBar	Alphabetically	Legend

In TScrollBar

Create

SetParams

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX 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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetParams

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TScrollBar.Create
 CLX 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, csOpaque]

Height is set to 25, and Width to 121.

Palette's ColorRole and TextColorRole properties are set to crButton and crButtonText, respectively.

TabStop is set to True.


TScrollBar.SetParams
 CLX 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

TWidgetControl

TScrollBar


TScrollBox
 CLX Reference

 TScrollBox

Hierarchy	Properties	Methods	Events	See also

TScrollBox represents a scrolling area (a scroll box) in a window.

Unit

QForms

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.


 CLX Reference

TScrollBox properties

TScrollBox	Alphabetically	Legend

Derived from TScrollingWidget

AutoScroll

ChildHandle

ClientOrigin

ClientRect

Handle

HorzScrollBar

VertScrollBar

Derived from TFrameControl

BorderStyle

Derived from TWidgetControl

Brush

ControlCount

Controls

Enabled

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

Constraints

BoundsRect

ClientHeight

ClientWidth

Color

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Parent

ParentColor

ParentFont

ParentShowHint

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TScrollBox properties

TScrollBox	By object	Legend

Action

Align

Anchors

AutoScroll

BorderStyle

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HorzScrollBar

Left

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

ShowHint

Showing

TabOrder

TabStop

Tag

Top

VertScrollBar

Visible

Width


 CLX Reference

TScrollBox events

TScrollBox	Alphabetically	Legend

Derived from TWidgetControl

OnEnter

OnExit

Derived from TControl

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize

OnStartDrag


 CLX Reference

TScrollBox events

TScrollBox	By object	Legend

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize

OnStartDrag


 CLX Reference

TScrollBox methods

TScrollBox	Alphabetically	Legend

In TScrollBox

Create

Derived from TScrollingWidget

Destroy

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

GetParentComponent

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


 CLX 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

DragDrop

Dragging

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TScrollBox.Create
 CLX 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

TWidgetControl

TScrollingWidget

TScrollBox


TScrollingWidget
 CLX Reference

TScrollingWidget

Hierarchy	Properties	Methods	See also

TScrollingWidget is the base class for controls that support scrolling.

Unit

QForms

Description

Use TScrollingWidget as a base class when defining a custom control that supports scrolling.

Typically, a scrolling widget control has horizontal and vertical scroll bars and scrolls a child control into view when the child control receives focus.

Examples of scrolling widget controls include TForm and TScrollBox objects.


 CLX Reference

TScrollingWidget properties

TScrollingWidget	Alphabetically	Legend

In TScrollingWidget

AutoScroll

ChildHandle

ClientOrigin

ClientRect

Handle

HorzScrollBar

VertScrollBar

Derived from TFrameControl

BorderStyle

Derived from TWidgetControl

Brush

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TScrollingWidget properties

TScrollingWidget	By object	Legend

Action

Align

Anchors

AutoScroll

BorderStyle

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HorzScrollBar

Left

Name

Owner

Parent

ParentWidget

ShowHint

Showing

TabOrder

TabStop

Tag

Top

VertScrollBar

Visible

Width


TScrollingWidget.AutoScroll
 CLX Reference

TScrollingWidget.AutoScroll

TScrollingWidget	See also

Indicates whether scroll bars appear automatically on the scrolling widget 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.


TScrollingWidget.ChildHandle
 CLX Reference

TScrollingWidget.ChildHandle

TScrollingWidget	See also

Surfaces the handle of a child widget that is used to implement the scrolling view window.

property ChildHandle: QWidgetH;

Description

TWidgetControl introduces ChildHandle to provide access to the Qt handle for an auxiliary widget that acts as a parent to any child controls. If there is only one widget used to implement a control, the value of ChildHandle is the same as Handle.

In TScrollingWidget, ChildHandle differs from the Handle property. It is the handle of a Qt viewport object that represents the visible client area and that allows the control to scroll.


TScrollingWidget.ClientOrigin
 CLX Reference

TScrollingWidget.ClientOrigin

TScrollingWidget	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.


TScrollingWidget.ClientRect
 CLX Reference

TScrollingWidget.ClientRect

TScrollingWidget	See also

Indicates the height and width of a control’s client area.

property ClientRect: TRect;

Description

Read ClientRect to determine the height and width for the client area of the current control. The height and width of the control are returned in the Bottom and Right members of a TRect structure. The size values are expressed in pixels.

Note:	ClientRect is the size of the physical client area of the control, not its logical client area. The ClientRect is not the entire scrolling range, but only the region that is available at any time.


TScrollingWidget.Handle
 CLX Reference

TScrollingWidget.Handle

TScrollingWidget	See also

Specifies the handle of the underlying Qt Widget.

property Handle: QOpenScrollViewH;

Description

Handle is a 4-byte identifier that uniquely represents the underlying Widget instance. Use this handle when making low-level function calls into the Qt shared libraries, where the function call requires an instance handle.


TScrollingWidget.HorzScrollBar
 CLX Reference

TScrollingWidget.HorzScrollBar

TScrollingWidget	See also 	Example

Represents the horizontal scroll bar for the scrolling widget control.

property HorzScrollBar: TControlScrollBar;

Description

Use HorzScrollBar to hide, show, or manipulate the horizontal scroll bar for the scrolling widget control.


TScrollingWidget.VertScrollBar
 CLX Reference

TScrollingWidget.VertScrollBar

TScrollingWidget	See also

Represents the vertical scroll bar for the scrolling widget control.

property VertScrollBar: TControlScrollBar;

Description

Use VertScrollBar to hide, show, or manipulate the vertical scroll bar for the scrolling widget control.


 CLX Reference

TScrollingWidget methods

TScrollingWidget	Alphabetically	Legend

In TScrollingWidget

AdjustClientRect

AdjustScrollRange

AlignControls

AutoScrollEnabled

AutoScrollInView

ChangeScale

ColorChanged

ControlsListChanging

Create

CreateWidget

Destroy

DisableAutoRange

EnableAutoRange

EventFilter

GetAlignedPaintDevice

GetChildHandle

GetClientOrigin

GetClientRect

GetPaintDevice

HookEvents

InitWidget

PaletteChanged

Resize

ScrollBarSize

ScrollBarVisibleChanged

ScrollBy

ScrollInView

ViewportHandle

ViewportRect

WidgetDestroyed

WidgetFlags

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

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


 CLX Reference

TScrollingWidget methods

TScrollingWidget	By object	Legend

AdjustClientRect

AdjustScrollRange

AfterConstruction

AlignControls

Assign

AutoScrollEnabled

AutoScrollInView

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ChangeScale

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ColorChanged

ContainsControl

ContentsRect

ControlAtPos

ControlsListChanging

Create

CreateParented

CreateParentedControl

CreateWidget

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

DragDrop

Dragging

EnableAlign

EnableAutoRange

EndDrag

EventFilter

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetAlignedPaintDevice

GetChildHandle

GetClientOrigin

GetClientRect

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetPaintDevice

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

HookEvents

InheritsFrom

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

PaletteChanged

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

Resize

SafeCallException

ScaleBy

ScreenToClient

ScrollBarSize

ScrollBarVisibleChanged

ScrollBy

ScrollInView

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState

ViewportHandle

ViewportRect

WidgetDestroyed

WidgetFlags


TScrollingWidget.AdjustClientRect
 CLX Reference

TScrollingWidget.AdjustClientRect

TScrollingWidget	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.


TScrollingWidget.AdjustScrollRange
 CLX Reference

TScrollingWidget.AdjustScrollRange

TScrollingWidget	See also

Provides an interface to adjust the scrolling range.

procedure AdjustScrollRange(Kind: TScrollBarKind; var ARange: Integer); virtual;

Description

If the AutoScroll property is True, AdjustScrollRange is called automatically when the scrolling widget needs to recalculate its scrolling range. As implemented in TScrollingWidget, AdjustScrollRange does nothing. Descendant classes override AdjustScrollRange to perform any special adjustments to the scrolling range, such as setting bottom margins.

Component writers may call AdjustScrollRange when making adjustments to a scrolling widget's vertical and horizontal scrolling ranges.

Kind indicates whether a scrolling range is horizontal or vertical

ARange is the current value of the range. When overriding the AdjustScrollRange method, use ARange to supply a new scrolling range value.


TScrollingWidget.AlignControls
 CLX Reference

TScrollingWidget.AlignControls

TScrollingWidget	See also

Aligns the controls in the scrolling widget control.

procedure AlignControls(AControl: TControl; var ARect: TRect); override;

Description

Use AlignControls to align the controls in the scrolling widget 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 widget control that contains the controls to align. ARect is automatically set to the entire area of the scrolling widget control.

If AutoScroll is True and the scrolling widget control is not being resized, the ranges of the scroll bars on the scrolling widget 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.


TScrollingWidget.AutoScrollEnabled
 CLX Reference

TScrollingWidget.AutoScrollEnabled

TScrollingWidget	See also

Indicates whether automatic scrolling is enabled.

function AutoScrollEnabled: Boolean; virtual;

Description

Call AutoScrollEnabled to determine whether automatic scrolling is enabled. AutoScrollEnabled returns the value of the AutoScroll property.


TScrollingWidget.AutoScrollInView
 CLX Reference

TScrollingWidget.AutoScrollInView

TScrollingWidget	See also

Scrolls a control into the visible area of the scrolling widget 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 widget control.

Unlike ScrollInView, AutoScrollInView does not perform scrolling when the scrolling widget control or the specified control are being loaded from a stream.

AutoScrollInView calls ScrollInView to perform any needed scrolling.


TScrollingWidget.ChangeScale
 CLX Reference

TScrollingWidget.ChangeScale

TScrollingWidget	See also

Resizes the scrolling widget control by a specific ratio.

procedure ChangeScale(M, D: Integer); override;

Description

Use ChangeScale to resize the scrolling widget 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 widget 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 widget control according to the ratio, and then calls TControl.ChangeScale.


TScrollingWidget.ColorChanged
 CLX Reference

TScrollingWidget.ColorChanged

TScrollingWidget	See also

Updates the scrolling widget and its scrollbars to reflect any changes to the Color property.

procedure ColorChanged; override;

Description

ColorChanged is called internally when the Color property changes. TScrollingWidget overrides the inherited method to ensure that the scrollbars reflect any color changes.


TScrollingWidget.ControlsListChanging
 CLX Reference

TScrollingWidget.ControlsListChanging

TScrollingWidget	See also

Responds when a child control is about to be added or removed.

procedure ControlsListChanging(Control: TControl; Inserting: Boolean); override;

Description

The protected ControlsListChanging method is called automatically when the Controls property is about to change. It makes all necessary internal adjustments so that the underlying widgets correctly reflect the change.

Control is the child control to be added or removed.

Inserting is True if Control is to be added, False if it is to be removed.


TScrollingWidget.Create
 CLX Reference

TScrollingWidget.Create

TScrollingWidget	See also

Creates and initializes a new TScrollingWidget object.

constructor Create(AOwner: TComponent); override;

Description

Use Create to create and initialize a new TScrollingWidget object.TScrollingWidget

AOwner is a TComponent object that owns the scrolling widget control.


TScrollingWidget.CreateWidget
 CLX Reference

TScrollingWidget.CreateWidget

TScrollingWidget	See also

Creates the underlying widget that implements the scrolling widget.

procedure CreateWidget; override;

Description

The CreateHandle method calls CreateWidget to perform the task of creating the underlying widget and hooking it up so that it responds to event notifications.


TScrollingWidget.Destroy
 CLX Reference

TScrollingWidget.Destroy

TScrollingWidget	See also

Removes the TScrollingWidget object from memory.

destructor Destroy; override;

TScrollingWidgetDescription

Do not call Destroy.TScrollingWidget Instead, call Free, which calls DestroyTScrollingWidget if the TScrollingWidget object is not nil.


TScrollingWidget.DisableAutoRange
 CLX Reference

TScrollingWidget.DisableAutoRange

TScrollingWidget	See also

Disables automatic scrolling.

procedure DisableAutoRange;

Description

Use DisableAutoRange to temporarily disable scrolling when rearranging controls in a scrolling widget.  Use the EnableAutoRange method to turn scrolling on again when finished rearranging the controls.


TScrollingWidget.EnableAutoRange
 CLX Reference

TScrollingWidget.EnableAutoRange

TScrollingWidget	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.


TScrollingWidget.EventFilter
 CLX Reference

TScrollingWidget.EventFilter

TScrollingWidget	See also

Responds to system events.

function EventFilter(Sender: QObjectH; Event: QEventH): Boolean; override;

Description

EventFilter is called automatically in response to events detected by the underlying widget. Such events include mouse events, keyboard events, system changes (such as changes to the palette), and changes to the underlying widget (moves, resizes, or the need to repaint). EventFilter gives the control an opportunity to respond to the event that occurred.

Sender is the handle to the underlying widget that receives the event. Typically, this is the same as the Handle or ChildHandle property.

Event is the handle to the Qt event object. Use this object to determine the type of event that occurred and obtain information about the event.

EventFilter returns True if the scrolling widget handles the event, False otherwise.

TScrollingWidget overrides the inherited method to prevent certain default responses (for example, to prevent the inherited method from confusing a movement of the viewport due to a scroll action from a movement of the scrolling widget itself).

Note:	When overriding the EventFilter method, be sure to call the inherited method so that the default event processing can occur.


TScrollingWidget.GetAlignedPaintDevice
 CLX Reference

TScrollingWidget.GetAlignedPaintDevice

TScrollingWidget	See also

Returns the Qt paint device to use when the widget is aligned.

function GetAlignedPaintDevice: QPaintDeviceH; override;

Description

GetAlignedPaintDevice is called automatically when a Qt paint device is required for the control and the Align property is not alNone. A paint device is an abstraction of a two-dimensional space that can be drawn using a painter.

As implemented in TScrollingWidget, GetAlignedPaintDevice returns the paint device for the widget indicated by ChildHandle.


TScrollingWidget.GetChildHandle
 CLX Reference

TScrollingWidget.GetChildHandle

TScrollingWidget	See also

Returns the value of the ChildHandle property.

function GetChildHandle: QWidgetH; override;;

Description

GetChildHandle is the protected read implementation of the ChildHandle property. TScrollingWidget overrides the inherited method to return the handle for the viewport widget that represents the scrolling region of this control.


TScrollingWidget.GetClientOrigin
 CLX Reference

TScrollingWidget.GetClientOrigin

TScrollingWidget	See also

Returns a coordinates of the upper left corner of the scrolling widget’s client area.

function GetClientOrigin: TPoint; override;

Description

GetClientOrigin is the protected read implementation of the ClientOrigin property. TScrollingWidget overrides the inherited method to use the coordinates of the underlying viewport widget.


TScrollingWidget.GetClientRect
 CLX Reference

TScrollingWidget.GetClientRect

TScrollingWidget	See also

Returns a rectangle defining the client area of the scrolling widget.

function GetClientRect: TRect; override;

Description

GetClientRect method is the protected read implementation of the ClientRect property. TScrollingWidget overrides the inherited method to make adjustments for the scrollbars.


TScrollingWidget.GetPaintDevice
 CLX Reference

TScrollingWidget.GetPaintDevice

TScrollingWidget	See also

Returns the handle of the paint device used by the scrolling widget.

function GetPaintDevice: QPaintDeviceH; override;

Description

GetAlignedPaintDevice is called automatically when a Qt paint device is required for the control. A paint device is an abstraction of a two-dimensional space that can be drawn using a painter.

As implemented in TScrollingWidget, GetAlignedPaintDevice returns the paint device for the widget indicated by ChildHandle.


TScrollingWidget.HookEvents
 CLX Reference

TScrollingWidget.HookEvents

TScrollingWidget	See also

Registers callbacks for handling system event events and widget signals.

procedure HookEvents; override;

Description

HookEvents is called automatically when the underlying widget is created. It registers the callbacks that allow a control to respond to events detected by the widget.

In TScrollingWidget, HookEvents registers a callback that responds to notifications when the contents of the widget scroll. After registering its own callback, HookEvents calls the inherited method, which registers the EventFilter method to respond to all system events.

Note:	When overriding the HookEvents method, be sure to call the inherited method so that ancestor classes register their own callbacks. For more information about overriding HookEvents, see TWidgetControl.HookEvents.


TScrollingWidget.InitWidget
 CLX Reference

TScrollingWidget.InitWidget

TScrollingWidget	See also

Initializes the underlying widget before it is displayed after it has been created.

procedure InitWidget; override;

Description

InitWidget is called internally after the CreateWidget method is called. InitWidget initializes the underlying widget prior to the widget being displayed after it has been created.

Override InitWidget to specify how the widget is to be displayed after it has been created. When overriding InitWidget, call the inherited method so that the default processing can occur.


TScrollingWidget.PaletteChanged
 CLX Reference

TScrollingWidget.PaletteChanged

TScrollingWidget	See also

Responds to changes in the palette that the scrolling widget uses.

procedure PaletteChanged(Sender: TObject); override;

Description

PaletteChanged responds to changes in the palette that this control uses to define its colors by notifiying the underlying widgets of the new palette.

Sender is the palette object that this control uses to define the available colors and to interpret symbolic color constants.


TScrollingWidget.Resize
 CLX Reference

TScrollingWidget.Resize

TScrollingWidget	See also

Responds when the dimensions of the scrolling widget change.

procedure Resize; override;

Description

Resize is called automatically immediately after the control’s dimensions change. As implemented in TScrollingWidget, Resize first checks the AutoScroll property, and if it is set, recalculates whether the scroll bars are needed. It then calls the inherited method, which generates an OnResize event.


TScrollingWidget.ScrollBarSize
 CLX Reference

TScrollingWidget.ScrollBarSize

TScrollingWidget	See also

Provides an opportunity to adjust the size of the scroll bars.

procedure ScrollBarSize(ScrollBar: TControlScrollBar; var Position, Extent: Integer); virtual;

Description

ScrollBarSize is called automatically in response to notifications from the underlying widget. It allows the control to make adjustments to the position and size of the scrollbar. For example, controls that do not use a scrollbar that extends the entire length or width of the control can use ScrollBarSize to adjust the length of the scrollbar.

ScrollBar is the scroll bar whose size the control can adjust. It is either the value of the HorzScrollBar or VertScrollBar property.

Position returns the position where the scrollbar appears in the control’s client area. If ScrollBar is the horizontal scroll bar, this is the x-coordinate. If ScrollBar is the vertical scroll bar, this is the y-coordinate.

Extent returns the length of the scroll bar.

As implemented in TScrollingWidget, ScrollBarSize leaves the Position and Extent parameters unchanged. Descendant classes can override this method to perform adjustments to the position or size of the scroll bars.


TScrollingWidget.ScrollBarVisibleChanged
 CLX Reference

TScrollingWidget.ScrollBarVisibleChanged

TScrollingWidget	See also

Responds when the visibility of a scroll bar changes.

procedure ScrollBarVisibleChanged(Sender: TControlScrollBar); virtual;

Description

ScrollBarVisibleChanged is called automatically whenever the visibility of a scrollbar changes. TScrollingWidget uses this method to ensure that all child controls are properly aligned, given the resulting change to its client area.


TScrollingWidget.ScrollBy
 CLX Reference

TScrollingWidget.ScrollBy

TScrollingWidget	See also

Scrolls the contents of the widget.

procedure ScrollBy(DeltaX, DeltaY: Integer); override;

Description

Call ScrollBy to scroll the contents within the scrolling widget. 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.


TScrollingWidget.ScrollInView
 CLX Reference

TScrollingWidget.ScrollInView

TScrollingWidget	See also

Scrolls a control into the visible area of the scrolling widget control.

procedure ScrollInView(AControl: TControl)

Description

Use ScrollInView to ensure that a specified control is in the visible area of the scrolling widget control. AControl specifies the TControl object to scroll into view.

Note:	If the ComponentState property for AControl or the scrolling widget control might be csLoading, use AutoScrollInView instead.


TScrollingWidget.ViewPortHandle
 CLX Reference

TScrollingWidget.ViewPortHandle

TScrollingWidget	See also

Returns the handle to the underlying viewport object that represents the visible client area of the scrolling widget.

function ViewportHandle: QWidgetH;

Description

ViewPortHandle returns the handle to the child widget that TScrollingWidget uses to represent its client area. This is the same as the value of the ChildHandle property.

TScrollingWidget often uses ViewPortHandle internally, rather than the ChildHandle property, when it needs to ensure that it has the handle to the viewport. In this way, descendant classes that override the ChildHandle property can still function properly.


TScrollingWidget.ViewPortRect
 CLX Reference

TScrollingWidget.ViewPortRect

TScrollingWidget	See also

Returns the dimensions, in pixels, of the underlying viewport object.

function ViewportRect: TRect; override;

Description

ViewportRect returns the bounds of the viewport, which is the widget used to manage its client area.


TScrollingWidget.WidgetDestroyed
 CLX Reference

TScrollingWidget.WidgetDestroyed

TScrollingWidget

Responds when the underlying widget is destroyed.

procedure WidgetDestroyed; override;

Description

Override WidgetDestroyed to perform any special processing that should occur immediately after the underlying widget is destroyed.


TScrollingWidget.WidgetFlags
 CLX Reference

TScrollingWidget.WidgetFlags

TScrollingWidget	See also

Returns the flags to use when creating the underlying widget.

function WidgetFlags: Integer; override;

Description

The protected CreateWidget method generates the underlying widget for the scrolling widget control. CreateWidget calls WidgetFlags to obtain a set of widget flags that control the behavior of the widget such as how it will work, how it will paint, and so on.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TScrollingWidget


TShape
 CLX Reference

 TShape

Hierarchy	Properties	Methods	Events	Using TShape	See also

TShape represents a geometric shape that can be drawn on a form.

Unit

QExtCtrls

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.


 CLX Reference

TShape properties

TShape	Alphabetically	Legend

In TShape

Brush

Pen

Shape

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Enabled

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Parent

ParentShowHint

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TShape properties

TShape	By object	Legend

Action

Align

Anchors

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Parent

ParentShowHint

Pen

Shape

ShowHint

Tag

Top

Visible

Width


TShape.Brush
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TShape events

TShape	Alphabetically	Legend

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TShape events

TShape	By object	Legend

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TShape methods

TShape	Alphabetically	Legend

In TShape

Create

Derived from TGraphicControl

Destroy

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

Invalidate

ParentToClient

Refresh

Repaint

ScreenToClient

SendToBack

SetBounds

Show

Update

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX 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

DragDrop

Dragging

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

Show

Update

UpdateAction


TShape.Create
 CLX 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.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TShape


TSizeConstraints
 CLX Reference

TSizeConstraints

Hierarchy	Properties	Methods	Events	See also

Contains size constraints for a control.

Unit

QControls

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.


 CLX Reference

TSizeConstraints properties

TSizeConstraints	Alphabetically	Legend

In TSizeConstraints

Control

MaxHeight

MaxWidth

MinHeight

MinWidth


 CLX Reference

TSizeConstraints properties

TSizeConstraints	By object	Legend

Control

MaxHeight

MaxWidth

MinHeight

MinWidth


TSizeConstraints.Control
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TSizeConstraints events

TSizeConstraints	Alphabetically	Legend

In TSizeConstraints

OnChange


 CLX Reference

TSizeConstraints events

TSizeConstraints	By object	Legend

OnChange


TSizeConstraints.OnChange
 CLX Reference

TSizeConstraints.OnChange

TSizeConstraints

Occurs when the size constraints change.

property OnChange: TNotifyEvent;

Description

Use OnChange to perform actions when the size constraints change.


 CLX 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


 CLX 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
 CLX 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
 CLX Reference

TSizeConstraints.Change

TSizeConstraints

Called when the size constraints change.

procedure Change; dynamic;

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
 CLX 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


LoadFromResourceName example
 CLX 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;


ScanLine, Height example
 CLX 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('MyBitmap.png');

    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
 CLX Reference

Canvas, Transparent, TransparentMode, TransparentColor example

procedure TForm1.Button1Click(Sender: TObject);

var

  Bitmap : TBitMap;

begin

  Bitmap := TBitmap.Create;

  try

    with Bitmap do begin

      LoadFromFile('MyBitmap.png');

      Transparent := True;

      TransParentColor := BitMap.Canvas.Brush.Color;

      Form1.Canvas.Draw(0,0,BitMap);

      TransparentMode := tmAuto;

      Form1.Canvas.Draw(50,50,BitMap);

    end;

  finally

    Bitmap.Free;

  end;

end;


Columns, Caption, Items, SubItems, Add example
 CLX 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;


ActivePage, PageCount, OnChange, AddObject example
 CLX Reference

ActivePage, PageCount, OnChange, AddObject 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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;


Pages, TabHeight, TabWidth, TextHeight, TextWidth example
 CLX 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
 CLX 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
 CLX 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 := SQLDataSet1.RecordCount;

    SQLDataSet1.First;

    for i := Min to Max do

    begin

      Position := i;

      SQLDataSet1.Next;

      // do something with the current record

    end;

  end;

end;


Step, StepIt example
 CLX 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 = 'MyFile';

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
 CLX 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.


SimplePanel, SimpleText, Add example
 CLX 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 QStdCtrls  to your uses clause to support TMemo.

uses QStdCtrls;

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 TMemo, set it's

    // properties, and display on the form.

    with TMemo.Create(Self) do

    begin

      // Display the memo control on the surface

      // of the form.

      Parent := Self;

      // The memo control takes all space left

      // over from the StatusBar.

      Align := alClient;

      // Add 50 lines to the memo

      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 memo: ' +

        IntToStr(Lines.Count);

    end;

  end;

end;


Font, Name, Fonts example
 CLX Reference

Font, Name, Fonts example

To use this example, place a TComboBox and TMemo on a form.

During form creation, a list of font names is loaded into the combo box. When the combo box is clicked, the memo 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

  Memo1.Font.Name := ComboBox1.Text;

end;


TStrings::Assign, TStrings::Add example
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

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('BKGRND.png'); { Load the bitmap from a file}

end;

end.


TopIndex Example
 CLX 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
 CLX 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: TWidgetControl; 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;


Insert Example
 CLX 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
 CLX Reference

CustomForms example

The following code adds the name of all formsand dialogs 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
 CLX 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;


Selected, Item Example
 CLX Reference

Selected, 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;


Hint, OnHint, GetLongHint Example
 CLX 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 *.xfm}

{ 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.


Cursor Example
 CLX 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;


LockList, UnlockList Example
 CLX 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;


Align, PageControl, TPageControl.Create example
 CLX 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
 CLX Reference

SaveToStream, LoadFromStream example

This example requires TListBox, TMemo, 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 memo.

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

  Memo1.Lines.LoadFromStream( TempStream); // load stream contents into memo

  TempStream.Free;

end;


OnCustomDrawItem, DisplayRect, Level, Indent Example
 CLX Reference

OnCustomDrawItem, DisplayRect, Level, Indent example

The following example 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;


OnUpdate, Checked Example
 CLX 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
 CLX 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
 CLX Reference

WriteComponent, Seek, ObjectBinaryToText, DataString, ObjectTextToBinary, ReadComponent Example

This example shows how to use the built-in  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;


CopyMode, CopyRect Example
 CLX 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;


FindComponent Example
 CLX 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;


SaveToFile, Create, Height, Width, Canvas, ChangeFileExt Example
 CLX 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 ];

  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
 CLX 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->Items[TabControl1.TabIndex].Caption);

  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(TabContol1.Tabs->Items[TabControl1.TabIndex].Caption);

end;


Canvas Example
 CLX 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(Sender: TObject; Index: Integer; Rect:TRect; State: TOwnerDrawState);

var

  Bitmap: TBitmap;      { temporary variable for the item’s bitmap }

  Offset: Integer;      { text offset width }

begin

  with (Sender 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((Sender as TListBox).Items.Objects[Index]); { get the bitmap }

  if Bitmap <> nilthen

  begin

    Draw(Rect.Left + Offset, Rect.Top, Bitmap); {render bitmap}

    Offset := Bitmap.width + 6;    { add four pixels between bitmap and text}

  end;

  TextOut(Rect.Left + Offset, Rect.Top, (Sender as TListBox).Items[Index])  { display the text }

  end;

end;


ReadBoolean, WriteBoolean, ReadComponent, WriteComponent, DefineProperties, DefineProperty, Ancestor Example
 CLX 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;

}


TImageList GetBitmap example
 CLX 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;


TPaintBox OnPaint example
 CLX 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
 CLX 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
 CLX 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';

  Edit1->SetSelTextBuf(temp_string);

end;


Adding a TMenuItem to a Popup menu at runtime example
 CLX 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;


GetNextItem example
 CLX 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
 CLX 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.


TSpeedButton
 CLX Reference

 TSpeedButton

Hierarchy	Properties	Methods	Events	Using TSpeedButton	See also

TSpeedButton is a button that is used to execute commands or set modes.

Unit

QButtons

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.


 CLX Reference

TSpeedButton properties

TSpeedButton	Alphabetically	Legend

In TSpeedButton

AllowAllUp

Caption

Down

Flat

Glyph

GroupIndex

Layout

Margin

NumGlyphs

Spacing

Transparent

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DragMode

Enabled

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Parent

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TSpeedButton properties

TSpeedButton	By object	Legend

Action

Align

AllowAllUp

Anchors

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

Down

DragMode

Enabled

Flat

Font

Glyph

GroupIndex

Height

HelpContext

HelpKeyword

HelpType

Hint

Layout

Left

Margin

Name

NumGlyphs

Owner

Parent

ParentFont

ParentShowHint

PopupMenu

ShowHint

Spacing

Tag

Top

Transparent

Visible

Width


TSpeedButton.AllowAllUp
 CLX 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.Caption
 CLX Reference

TSpeedButton.Caption

TSpeedButton	See also

Specifies the caption, or label, that appears on the speed button.

property Caption: TCaption;

Description

Use Caption to specify the caption that appears on the speed button. If the speed button is the client of an action, the Caption property can be set by that action.


TSpeedButton.Down
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TSpeedButton events

TSpeedButton	Alphabetically	Legend

Derived from TControl

OnClick

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TSpeedButton events

TSpeedButton	By object	Legend

OnClick

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TSpeedButton methods

TSpeedButton	Alphabetically	Legend

In TSpeedButton

Click

Create

Destroy

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

Invalidate

ParentToClient

Refresh

Repaint

ScreenToClient

SendToBack

SetBounds

Show

Update

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX 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

DragDrop

Dragging

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

Show

Update

UpdateAction


TSpeedButton.Click
 CLX 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
 CLX 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
 CLX 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


TSpinEdit
 CLX Reference

TSpinEdit

Hierarchy	Properties	Methods	Events

Spin boxes for choosing from a numeric range

Unit

QComCtrls

Description

TSpinEdit is a generic implementation of spin boxes, as defined in TCustomSpinEdit. Spin boxes allow the user to choose from a range of numeric values by clicking on special "spin buttons", or by pressing vertical arrow keys. Users can also enter the value in a text box, as with an edit control. Spin boxes support non-numeric prefixes and suffixes, such as currency symbols, and special values with non-numeric representations.


 CLX Reference

TSpinEdit Properties

TSpinEdit	Alphabetically	Legend

Derived from TCustomSpinEdit

ButtonStyle

CleanText

Increment

Max

Min

Prefix

SpecialText

Suffix

Text

Value

Wrap

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TSpinEdit Properties

TSpinEdit	By Object	Legend

Action

Align

Anchors

BoundsRect

Brush

ButtonStyle

ChildHandle

CleanText

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Increment

Left

Max

Min

Name

Owner

Parent

ParentShowHint

ParentWidget

PopupMenu

Prefix

ShowHint

Showing

SpecialText

Suffix

TabOrder

TabStop

Tag

Text

Top

Value

Visible

Width

Wrap


 CLX Reference

TSpinEdit Events

TSpinEdit	Alphabetically	Legend

Derived from TCustomSpinEdit

OnChanged

Derived from TWidgetControl

OnEnter

OnExit

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TSpinEdit Events

TSpinEdit	By Object	Legend

OnChanged

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TSpinEdit Methods

TSpinEdit	Alphabetically	Legend

Derived from TCustomSpinEdit

Create

StepDown

StepUp

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TSpinEdit Methods

TSpinEdit	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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

StepDown

StepUp

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomSpinEdit

TSpinEdit


TSplitter
 CLX Reference

 TSplitter

Hierarchy	Properties	Methods	Events	Using TSplitter	See also

TSplitter divides the client area of a form into resizable panes.

Unit

QExtCtrls

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.


 CLX Reference

TSplitter properties

TSplitter	Alphabetically	Legend

In TSplitter

AutoSnap

Beveled

MinSize

ResizeStyle

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

Enabled

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Parent

ParentColor

ParentShowHint

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TSplitter properties

TSplitter	By object	Legend

Action

Align

Anchors

AutoSnap

Beveled

BoundsRect

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

Enabled

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

MinSize

Name

Owner

Parent

ParentColor

ParentShowHint

ResizeStyle

ShowHint

Tag

Top

Visible

Width


TSplitter.AutoSnap
 CLX 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
 CLX 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
 CLX Reference

TSplitter.MinSize

TSplitter	See also

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
 CLX 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.


 CLX Reference

TSplitter events

TSplitter	Alphabetically	Legend

In TSplitter

OnCanResize

OnMoved

OnPaint


 CLX Reference

TSplitter events

TSplitter	By object	Legend

OnCanResize

OnMoved

OnPaint


TSplitter.OnCanResize
 CLX 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
 CLX Reference

TSplitter.OnMoved

TSplitter	See also

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
 CLX 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. 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 repaints itself, 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.


 CLX Reference

TSplitter methods

TSplitter	Alphabetically	Legend

In TSplitter

Create

Destroy

DoCanResize

MouseDown

MouseMove

MouseUp

Paint

RequestAlign

StopSizing

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

Invalidate

ParentToClient

Refresh

Repaint

ScreenToClient

SendToBack

SetBounds

Show

Update

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

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

SafeCallException


 CLX Reference

TSplitter methods

TSplitter	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoCanResize

DragDrop

Dragging

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

MethodAddress

MethodName

MouseDown

MouseMove

MouseUp

NewInstance

Paint

ParentToClient

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

RequestAlign

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

Show

StopSizing

Update

UpdateAction


TSplitter.Create
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TSplitter.Paint

TSplitter 	See also

Draws the image of the splitter.

procedure Paint; override;

Description

The Paint method is called automatically when the splitter needs to be painted. 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
 CLX 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
 CLX 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


TStack
 CLX 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.


 CLX 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


 CLX 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


TStream
 CLX 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)


 CLX Reference

TStream properties

TStream	Alphabetically	Legend

In TStream

Position

Size


 CLX Reference

TStream properties

TStream	By object	Legend

Position

Size


TStream.Position
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TStream.::ReadComponentRes

TStream	See also

Reads components and their properties from a stream in a  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
 CLX Reference

TStream.::ReadResHeader

TStream	See also

Reads a  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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TStream.::WriteComponentRes

TStream	See also

Writes components and their properties to a stream from a  resource file.

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  resource-file.

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
 CLX 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
 CLX 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  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
 CLX Reference

TStream.::WriteResourceHeader

TStream 	See also

Writes a  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  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
 CLX Reference

TStringGridStrings

Hierarchy	Properties	Methods	See also

TStringGridStrings maintains a list of the strings that appear in the cells of a string grid.

Unit

QGrids

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.


 CLX Reference

TStringGridStrings properties

TStringGridStrings	Alphabetically	Legend

In TStringGridStrings

Count

Objects

Strings

Derived from TStrings

Capacity

CommaText

DelimitedText

Delimiter

Names

QuoteChar

StringsAdapter

Text

Values


 CLX Reference

TStringGridStrings properties

TStringGridStrings	By object	Legend

Capacity

CommaText

Count

DelimitedText

Delimiter

Names

Objects

QuoteChar

Strings

StringsAdapter

Text

Values


TStringGridStrings.Count
 CLX 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
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TStrings properties

TStrings	Alphabetically	Legend

In TStrings

Capacity

CommaText

Count

DelimitedText

Delimiter

Names

Objects

QuoteChar

Strings

StringsAdapter

Text

UpdateCount

Values


 CLX Reference

TStrings properties

TStrings	By object	Legend

Capacity

CommaText

Count

DelimitedText

Delimiter

Names

Objects

QuoteChar

Strings

StringsAdapter

Text

UpdateCount

Values


TStrings.Capacity
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.

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
 CLX Reference

TStrings.Objects

TStrings	See also

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
 CLX 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
 CLX 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
 CLX Reference

TStrings.StringsAdapter

TStrings

Implements an IStringsAdapter interfacefor the TStrings object.

property StringsAdapter: IStringsAdapter;

Description

Do not use the StringsAdapter property. StringsAdapter is used internally.


TStrings.Text
 CLX 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 (on Windows) 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
 CLX 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
 CLX 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.

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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 (on Windows) line feed. The caller is responsible for freeing the returned value using the StrDispose procedure.


TStrings.GetTextStr
 CLX 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 (on Windows) line feed.


TStrings.IndexOf
 CLX 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
 CLX 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.

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
 CLX 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;

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
 CLX 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
 CLX 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
 CLX Reference

TStrings.LoadFromFile

TStrings	See also

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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TStrings.SaveToFile

TStrings	See also

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.

Note:	SaveToFile saves the strings as they appear in the list. If the last string does not have an end-of-line marker, the resulting file may be considered incomplete by some editors.


TStrings.SaveToStream
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TStringStream properties

TStringStream	Alphabetically	Legend

In TStringStream

DataString

Size

Derived from TStream

Position


 CLX Reference

TStringStream properties

TStringStream	By object	Legend

DataString

Position

Size


TStringStream.DataString
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TStreamAdapter

Hierarchy	Properties	Methods	See also

TStreamAdapter implements the IStream interface on a TStream object.

Unit

Classes

Description

 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.


 CLX Reference

TStreamAdapter properties

TStreamAdapter	Alphabetically	Legend

In TStreamAdapter

Stream

StreamOwnerShip

Derived from TInterfacedObject

RefCount


 CLX Reference

TStreamAdapter properties

TStreamAdapter	By object	Legend

RefCount

Stream

StreamOwnerShip


TStreamAdapter.Stream
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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

QGrids

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.


 CLX Reference

TStringGrid properties

TStringGrid	Alphabetically	Legend

In TStringGrid

Cells

Cols

Objects

Rows

Derived from TCustomGrid

BorderStyle

ClientRect

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 TWidgetControl

Brush

ChildHandle

ClientOrigin

ControlCount

Controls

Enabled

Handle

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TStringGrid properties

TStringGrid	By object	Legend

Action

Align

Anchors

BorderStyle

BoundsRect

Brush

Canvas

Cells

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Col

ColCount

Color

Cols

ColWidths

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DefaultColWidth

DefaultDrawing

DefaultRowHeight

DesignInfo

DragMode

EditorMode

Enabled

FixedColor

FixedCols

FixedRows

Font

GridHeight

GridLineWidth

GridWidth

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

LeftCol

Name

Objects

Options

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

Row

RowCount

RowHeights

Rows

ScrollBars

Selection

ShowHint

Showing

TabOrder

TabStop

TabStops

Tag

Top

TopRow

Visible

VisibleColCount

VisibleRowCount

Width


TStringGrid.Cells
 CLX 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
 CLX 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
 CLX 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
 CLX 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.


 CLX Reference

TStringGrid events

TStringGrid	Alphabetically	Legend

Derived from TDrawGrid

OnColumnMoved

OnDrawCell

OnGetEditMask

OnGetEditText

OnRowMoved

OnSelectCell

OnSetEditText

OnTopLeftChanged

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheelDown

OnMouseWheelUp

OnStartDrag


 CLX Reference

TStringGrid events

TStringGrid	By object	Legend

OnClick

OnColumnMoved

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDrawCell

OnEndDrag

OnEnter

OnExit

OnGetEditMask

OnGetEditText

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheelDown

OnMouseWheelUp

OnRowMoved

OnSelectCell

OnSetEditText

OnStartDrag

OnTopLeftChanged


 CLX Reference

TStringGrid methods

TStringGrid	Alphabetically	Legend

In TStringGrid

Create

Destroy

Derived from TDrawGrid

CellRect

MouseToCell

Derived from TCustomGrid

MouseCoord

Derived from TCustomControl

Invalidate

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX 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

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

MouseCoord

MouseToCell

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


TStringGrid.Create
 CLX 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
 CLX 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

TWidgetControl

TCustomControl

TCustomGrid

TDrawGrid

TStringGrid


TStringList
 CLX 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.


 CLX 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


 CLX Reference

TStringList properties

TStringList	By object	Legend

Capacity

CaseSensitive

CommaText

Count

DelimitedText

Delimiter

Duplicates

Names

Objects

QuoteChar

Sorted

Strings

StringsAdapter

Text

Values


TStringList.Capacity
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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';


 CLX Reference

TStringList events

TStringList	Alphabetically	Legend

In TStringList

OnChange

OnChanging


 CLX Reference

TStringList events

TStringList	By object	Legend

OnChange

OnChanging


TStringList.OnChange
 CLX 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
 CLX 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.


 CLX 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


 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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 UTF-8 order, as implemented in the Sort method.


TStringList.Delete
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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


TStatusBar
 CLX Reference

 TStatusBar

Hierarchy	Properties	Methods	Events	Using TStatusBar	See also

TStatusBar represents a status bar.

Unit

QComCtrls

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.

Panels can be placed on the right or the left of the status bar by setting their Position properties.


 CLX Reference

TStatusBar Properties

TStatusBar	Alphabetically	Legend

In TStatusBar

AutoHint

BorderWidth

Panel

Panels

SimplePanel

SimpleText

SizeGrip

Derived from TCustomControl

Canvas

Derived from TWidgetControl

Brush

ChildHandle

ClientOrigin

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TStatusBar Properties

TStatusBar	By Object	Legend

Action

Align

Anchors

AutoHint

BorderWidth

BoundsRect

Brush

Canvas

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

Owner

Panel

Panels

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ShowHint

Showing

SimplePanel

SimpleText

SizeGrip

TabOrder

TabStop

Tag

Top

Visible

Width


TStatusBar.AutoHint
 CLX Reference

TStatusBar.AutoHint

TStatusBar	Properties

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.


TStatusBar.BorderWidth
 CLX Reference

TStatusBar.BorderWidth

TStatusBar

Specifies the width of the control’s border.

property BorderWidth: TBorderWidth;

Description

Use BorderWidth to get or set the width of the status bar's border. This is the area within the edge of the control and outside panel bevels. Text and graphics are clipped to the area within the border.


TStatusBar.Panel
 CLX Reference

TStatusBar.Panel

TStatusBar

Return specific panel object.

property Panel[PanelPosition: TPanelPosition; Index: Integer]: TStatusPanel;

Description

Panel returns a specific panel indicated by Index, counting from 0. Only panels position on the left or the right are counted, depending on the value of PanelPosition. If no panel meets the criteria defined by Position and Index, an EListError is thrown.


TStatusBar.Panels
 CLX Reference

TStatusBar.Panels

TStatusBar	See also

Lists the panels (TStatusPanel) 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.


TStatusBar.SimplePanel
 CLX Reference

TStatusBar.SimplePanel

TStatusBar	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..


TStatusBar.SimpleText
 CLX Reference

TStatusBar.SimpleText

TStatusBar	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.


TStatusBar.::SizeGrip
 CLX Reference

TStatusBar.::SizeGrip

TStatusBar	See also

Determines whether the status bar is resizable at runtime.

property SizeGrip: Boolean;

Description

If SizeGrip is set to True,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 TStatusBar is the child of a TCustomForm 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.


 CLX Reference

TStatusBar Events

TStatusBar	Alphabetically	Legend

In TStatusBar

OnDrawPanel

OnHint

OnPanelClick

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDrag


 CLX Reference

TStatusBar Events

TStatusBar	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDrawPanel

OnEndDrag

OnHint

OnMouseDown

OnMouseMove

OnMouseUp

OnPanelClick

OnResize

OnStartDrag


TStatusBar.OnDrawPanel
 CLX 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.::OnHint
 CLX Reference

TStatusBar.::OnHint

TStatusBar	Events	SeeAlso

Occurs before the status bar’s hint is displayed.

property OnHint: TNotifyEvent;

Description

Write code in the OnHint event handler to customize the hint text.


TStatusBar.::OnPanelClick
 CLX 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.


 CLX Reference

TStatusBar methods

TStatusBar	Alphabetically	Legend

In TStatusBar

BeginUpdate

Create

Destroy

DoHint

EndUpdate

ExecuteAction

FindPanel

FlipChildren

InitWidget

Invalidate

MouseUp

PaletteCreated

RequestAlign

Resize

SetBounds

Update

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TStatusBar methods

TStatusBar	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BeginUpdate

BringToFront

Broadcast

CanFocus

ClassInfo

ClassNameIs

ClassName

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Create

DefaultHandler

DestroyComponents

Destroying

Destroy

DisableAlign

Dispatch

DoHint

DragDrop

Dragging

EnableAlign

EndDrag

EndUpdate

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindPanel

FlipChildren

Focused

FreeInstance

FreeNotification

Free

GetInterfaceEntry

GetInterfaceTable

GetInterface

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InitWidget

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

MethodAddress

MethodName

MouseUp

NewInstanceTObject_NewInstance>main

PaletteCreated

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

RequestAlign

Resize

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

UpdateAction

UpdateControlState

Update


TStatusBar.BeginUpdate
 CLX Reference

TStatusBar.BeginUpdate

TStatusBar	See also

Suspends screen repainting.

procedure BeginUpdate;

Description

The BeginUpdate method prevents screen repainting of the status bar until the EndUpdate method is called. Use BeginUpdate to speed processing and avoid flicker while items are added to or deleted from a status bar.


TStatusBar.ControlsAligned
 CLX Reference

TStatusBar.ControlsAligned

TStatusBar	See also

Notify control that child alignment complete.

procedure ControlsAligned; override;

Description

As implemented in TStatusBar, ControlsAligned updates the panel layout.


TStatusBar.CursorChanged
 CLX Reference

TStatusBar.CursorChanged

TStatusBar	See also

Respond to cursor change.

procedure CursorChanged; override;

Description

TStatusBar overrides CursorChanged in order to change the cursor on each of its child controls.


TStatusBar.Create
 CLX Reference

TStatusBar.Create

TStatusBar	See also

Creates and initializes a TStatusBar component.

constructor Create(AOwner: TComponent); override;

Description

The Create method creates a status bar along with its canvas and status panels.


TStatusBar.Destroy
 CLX Reference

TStatusBar.Destroy

TStatusBar	See also

Destroys TStatusBar and frees its memory.

destructor Destroy; override;

Description

The Destroy method destroys the status bar along with its canvas and status panels.


TStatusBar.DoHint
 CLX Reference

TStatusBar.DoHint

TStatusBar	Methods

Processes hint actions.

function DoHint: Boolean; virtual;

Description

Override DoHint in a derived class to process hint actions.

DoHint returns whether or not the hint action was processed.

By default, DoHint calls the OnHint event handler and returns True. If no OnHint event handler is assigned, DoHint returns False.


TStatusBar.DrawPanel
 CLX 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.


TStatusBar.EnabledChanged
 CLX Reference

TStatusBar.EnabledChanged

TStatusBar	See also

Respond to change in Enabled property.

procedure EnabledChanged; override;

Description

As implemented in TStatusBar, EnabledChanged calls the inherited method, then sets the Enabled property of each of its child controls to match its own.


TStatusBar.EndUpdate
 CLX Reference

TStatusBar.EndUpdate

TStatusBar	See also

Re-enables screen repainting.

procedure EndUpdate;

Description

Use EndUpdate to re-enable screen repainting that was turned off with the BeginUpdate method.


TStatusBar.ExecuteAction
 CLX Reference

TStatusBar.ExecuteAction

TStatusBar	Methods

Processes actions for the status bar.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

Override ExecuteAction in a derived class to specify how actions are processed.

ExecuteAction overrides the inherited method in order to process hint actions.

ExecuteAction calls DoHint. If DoHint returns True and AutoHint is True, ExecuteAction displays the application’s current hint in the first panel of the status bar. Otherwise, ExecuteAction calls the inherited method.


TStatusBar.FindPanel
 CLX Reference

TStatusBar.FindPanel

TStatusBar 	See also

Flips the panels of the status bar from left to right or from right to left.

function FindPanel(PanelPosition: TPanelPosition; Index: Integer): TStatusPanel;

Description

FindPanel returns a specific panel indicated by Index, counting from 0. Only panels positioned on the left or the right are counted, depending on the value of PanelPosition. If no panel meets the criteria defined by Position and Index, nil is returned.


TStatusBar.FlipChildren
 CLX Reference

TStatusBar.FlipChildren

TStatusBar	Methods

Flips the panels of the status bar from left to right or from right to left.

procedure FlipChildren(AllLevels: Boolean); override;

Description

FlipChildren overrides FlipChildren to specify how the status bar’s panels are flipped. Panels with PanelPosition ppLeft are changed to ppRight and conversely.


TStatusBar.InitWidget
 CLX Reference

TStatusBar.InitWidget

TStatusBar	See also

Initializes the underlying Qt widget

procedure InitWidget; override;

Description

TStatusBar overrides InitWidget in order initialize the Height, BorderWidth, and Color properties.


TStatusBar.Invalidate
 CLX Reference

TStatusBar.Invalidate

TStatusBar	See also

Schedules a control repaint.

procedure Invalidate; override;

Description

TStatusBar overrides Invalidate in order to schedule a repaint of the size grip.


TStatusBar.MouseUp
 CLX Reference

TStatusBar.MouseUp

TStatusBar	See also

Generates an OnMouseUp event.

procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

TStatusBar overrides MouseUp in order to call the DoPanelClick method.


TStatusBar.Paint
 CLX Reference

TStatusBar.Paint

TStatusBar	See also

Render the control.

procedure Paint; override;

Description

TStatusBar overrides Paint in order to render the control's painels.


TStatusBar.PaletteCreated
 CLX Reference

TStatusBar.PaletteCreated

TStatusBar	See also

Responds when the component is created from the component palette.

procedure PaletteCreated; dynamic;

Description

TStatusBar overrides PaletteCreated in order to initialize the SizeGrip property at design time.


TStatusBar.RequestAlign
 CLX Reference

TStatusBar.RequestAlign

TStatusBar	See also

Instructs the parent of a control to reposition the control, enforcing its Align property.

procedure RequestAlign; override;

Description

TStatusBar overrides RequestAlign in order to invalidate the control after it is realigned.


TStatusBar.Resize
 CLX Reference

TStatusBar.Resize

TStatusBar	See also

Respond to control resize.

procedure Resize; override;

Description

TStatusBar overrides Resize in order to update the panels and size grip.


TStatusBar.SetBounds
 CLX Reference

TStatusBar.SetBounds

TStatusBar	See also

Sets the Left, Top, Width, and Height properties all at once.

procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); virtual;

Description

TStatusBar overrides SetBounds in order to update the size grip.


TStatusBar.Update
 CLX Reference

TStatusBar.Update

TStatusBar	See also

Processes any pending paint messages immediately.

procedure Update; override;

Description

Call Update to force the status bar to be repainted. TStatusBar.Update is similar to TWidgetControl.Update, but does not updates Status Bar panels if called in a BeginUpdate/EndUpdate block.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TCustomControl

TCustomPanel

TStatusBar


TTreeNode
 CLX Reference

TTreeNode

Hierarchy	Properties	Methods	See also

TTreeNode describes an individual node in a tree view control.

Unit

QComCtrls

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.


 CLX Reference

TTreeNode Properties

TTreeNode	Alphabetically	Legend

In TTreeNode

AbsoluteIndex

Count

Deleting

DropTarget

Focused

HasChildren

Index

IsVisible

Item

Level

Owner

Parent

SelectedIndex

Text

TreeView

Derived from TCustomViewItem

Checked

Data

Expanded

Height

ImageIndex

ItemType

Selectable

Selected

SubItemImages

SubItems

TotalHeight


 CLX Reference

TTreeNode Properties

TTreeNode	By Object	Legend

AbsoluteIndex

Checked

Count

Data

Deleting

DropTarget

Expanded

Focused

HasChildren

Height

ImageIndex

Index

IsVisible

Item

ItemType

Level

Owner

Parent

Selectable

Selected

SelectedIndex

SubItemImages

SubItems

Text

TotalHeight

TreeView


TTreeNode.AbsoluteIndex
 CLX 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
 CLX 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.Deleting
 CLX 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
 CLX 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.Focused
 CLX 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.HasChildren
 CLX 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.Index
 CLX 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.IsVisible
 CLX 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
 CLX 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.Level
 CLX 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
 CLX 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
 CLX 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
 CLX 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.SelectedIndex
 CLX 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.Text
 CLX 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
 CLX 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.


 CLX Reference

TTreeNode Methods

TTreeNode	Alphabetically	Legend

In TTreeNode

AlphaSort

AssignTo

Collapse

Delete

DeleteChildren

Destroy

EditText

Expand

getFirstChild

GetLastChild

GetNext

GetNextChild

getNextSibling

GetNextVisible

GetPrev

GetPrevChild

getPrevSibling

GetPrevVisible

HasAsParent

IndexOf

MoveTo

Derived from TCustomViewItem

DisplayRect

MakeVisible

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


 CLX Reference

TTreeNode Methods

TTreeNode	By Object	Legend

AfterConstruction

AlphaSort

Assign

AssignTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Collapse

DefaultHandler

Delete

DeleteChildren

Destroy

Dispatch

DisplayRect

EditText

Expand

FieldAddress

Free

FreeInstance

getFirstChild

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLastChild

GetNamePath

GetNext

GetNextChild

getNextSibling

GetNextVisible

GetPrev

GetPrevChild

getPrevSibling

GetPrevVisible

HasAsParent

IndexOf

InheritsFrom

InitInstance

InstanceSize

MakeVisible

MethodAddress

MethodName

MoveTo

NewInstance

SafeCallException


TTreeNode.AlphaSort
 CLX Reference

TTreeNode.AlphaSort

TTreeNode	See also

Sorts tree nodes.

function AlphaSort(Ascending: Boolean): Boolean;

Description

Call AlphaSort to sort the subtree of the tree view alphabetically. If successful, the method returns True.


TTreeNode.AssignTo
 CLX Reference

TTreeNode.AssignTo

TTreeNode	See also

Copies the properties the tree node to another node.

procedure AssignTo(Dest: TPersistent); override;

Description

If Dest is a TTreeNode, AssignTo copies this node's Text, HasChildren, and SelectedIndex properties to Dest.


TTreeNode.Collapse
 CLX 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.Delete
 CLX 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
 CLX 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
 CLX 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.EditText
 CLX 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.Expand
 CLX 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
 CLX 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.GetLastChild
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.MoveTo
 CLX Reference

TTreeNode.MoveTo

TTreeNode	See also

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

TCustomViewItem

TTreeNode


TTreeNodes
 CLX Reference

TTreeNodes

Hierarchy	Properties	Methods	See also

TTreeNodes maintains a list of tree nodes in a tree view control.

Unit

QComCtrls

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.


 CLX Reference

TTreeNodes Properties

TTreeNodes	Alphabetically	Legend

In TTreeNodes

Item

Owner

Derived from TCustomViewItems

Count


 CLX Reference

TTreeNodes Properties

TTreeNodes	By Object	Legend

Count

Item

Owner


TTreeNodes.Item
 CLX 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
 CLX 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.


 CLX Reference

TTreeNodes Methods

TTreeNodes	Alphabetically	Legend

In TTreeNodes

Add

AddChild

AddChildFirst

AddChildObject

AddChildObjectFirst

AddFirst

AddObject

AddObjectFirst

Assign

Clear

Delete

GetFirstNode

GetNode

Insert

InsertObject

Derived from TCustomViewItems

BeginUpdate

ChangeItemTypes

Create

Destroy

EndUpdate

IndexOf

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


 CLX Reference

TTreeNodes Methods

TTreeNodes	By Object	Legend

Add

AddChild

AddChildFirst

AddChildObject

AddChildObjectFirst

AddFirst

AddObject

AddObjectFirst

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ChangeItemTypes

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

Free

FreeInstance

GetFirstNode

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetNode

IndexOf

InheritsFrom

InitInstance

Insert

InsertObject

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TTreeNodes.Add
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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.AddObject
 CLX 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.


 CLX 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.Assign
 CLX 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
 CLX 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
 CLX 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.Delete
 CLX 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.EndUpdate
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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

TCustomViewItems

TTreeNodes


TTreeView
 CLX 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

QComCtrls

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.


 CLX Reference

TTreeView Properties

TTreeView	Alphabetically	Legend

In TTreeView

SelectionCount

Derived from TCustomTreeView

AutoExpand

DropTarget

ItemMargin

Items

Selected

ShowButtons

SortType

TopItem

Derived from TCustomViewControl

ColumnClick

ColumnMove

ColumnResize

Columns

Images

Indent

MultiSelect

ReadOnly

RowSelect

ShowColumnHeaders

ShowColumnSortIndicators

SortColumn

Sorted

Derived from TFrameControl

BorderStyle

ClientOrigin

Derived from TWidgetControl

Brush

ClientRect

ControlCount

Controls

Enabled

Handle

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragMode

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TTreeView Properties

TTreeView	By Object	Legend

Action

Align

Anchors

AutoExpand

BorderStyle

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ColumnClick

ColumnMove

ColumnResize

Columns

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DragMode

DropTarget

Enabled

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Images

Indent

ItemMargin

Items

Left

MultiSelect

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWidget

PopupMenu

ReadOnly

RowSelect

Selected

SelectionCount

ShowButtons

ShowColumnHeaders

ShowColumnSortIndicators

ShowHint

Showing

SortColumn

Sorted

SortType

TabOrder

TabStop

Tag

Top

TopItem

Visible

Width


TTreeView.SelectionCount
 CLX Reference

TTreeView.SelectionCount

TTreeView	See also

Indicates the number of items that are selected when multiple selections are allowed.

property SelectionCount: Integer;

Description

SelectionCount is read-only. Use SelectionCount to find the number of selected items in the tree view when the MultiSelect property is True.

When the MultiSelect property is False, SelectionCount is always –1.


 CLX Reference

TTreeView Events

TTreeView	Alphabetically	Legend

Derived from TCustomTreeView

OnChange

OnChanging

OnCollapsed

OnCollapsing

OnDeletion

OnEdited

OnEditing

OnExpanded

OnExpanding

OnGetImageIndex

OnGetSelectedIndex

OnInsert

OnItemClick

OnItemDoubleClick

OnItemEnter

OnItemExitViewportEnter

OnItemMouseDown

OnViewPortMouseDown

Derived from TCustomViewControl

OnColumnClick

OnColumnDragged

OnColumnResize

OnCustomDrawBranch

OnCustomDrawItem

OnCustomDrawSubItem

Derived from TWidgetControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TTreeView Events

TTreeView	By Object	Legend

OnChange

OnChanging

OnClick

OnCollapsed

OnCollapsing

OnColumnClick

OnColumnDragged

OnColumnResize

OnContextPopup

OnCustomDrawBranch

OnCustomDrawItem

OnCustomDrawSubItem

OnDblClick

OnDeletion

OnDragDrop

OnDragOver

OnEdited

OnEditing

OnEndDrag

OnEnter

OnExit

OnExpanded

OnExpanding

OnGetImageIndex

OnGetSelectedIndex

OnInsert

OnItemClick

OnItemDoubleClick

OnItemEnter

OnItemExitViewportEnter

OnItemMouseDown

OnKeyDown

OnKeyPress

OnKeyString

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag

OnViewPortMouseDown


 CLX Reference

TTreeView Methods

TTreeView	Alphabetically	Legend

Derived from TCustomTreeView

AlphaSort

Create

Destroy

FullCollapse

FullExpand

GetNodeAt

LoadFromFile

LoadFromStream

SaveToFile

SaveToStream

SelectAll

Derived from TCustomViewControl

InvertSelection

IsEditing

Sort

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TTreeView Methods

TTreeView	By Object	Legend

AfterConstruction

AlphaSort

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FullCollapse

FullExpand

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetNodeAt

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvertSelection

InvokeHelp

IsEditing

IsImplementorOf

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

SaveToFile

SaveToStream

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Sort

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomViewControl

TCustomTreeView

TTreeView


TTab
 CLX Reference

 TTab

Hierarchy	Properties	Methods	See also

TTab represents a tab in a TCustomTabControl.

Unit

QComCtrls

Description

A TTab object represents a tab on a TCustomTabControl. TTabs are created and destroyed by Add and Clear methods applied to the collection. Each TTab has a Tabs property that points to the TTabs collection object to which the tab belongs.


 CLX Reference

TTab Properties

TTab	Alphabetically	Legend

In TTab

Caption

DisplayName

Enabled

Height

Highlighted

ImageIndex

Left

Row

Selected

TabRect

Tabs

Top

Visible

Width

Derived from TCollectionItem

Collection

ID

Index


 CLX Reference

TTab Properties

TTab	By Object	Legend

Caption

Collection

DisplayName

Enabled

Height

Highlighted

ID

ImageIndex

Index

Left

Row

Selected

TabRect

Tabs

Top

Visible

Width


TTab.Caption
 CLX Reference

 TTab.Caption

TTab	See also

Specifies the text that appears at the top of the tab.

property Caption: String;

Description

The Caption property contains a text string that identifies the tab to the user.


TTab.DisplayName
 CLX Reference

 TTab.DisplayName

TTab	See also

The name displayed in property editors.

property DisplayName: String;

Description

DisplayName is the string that represents the tab in property editors. The default is the value of the Caption property, unless that value is a zero-length string; in that case, the default is the class name.


TTab.Enabled
 CLX Reference

 TTab.Enabled

TTab	See also

Specifies whether the tab is enabled.

property Enabled: Boolean;

Description

Use Enabled to determine whether the user can select the tab


TTab.Height
 CLX Reference

 TTab.Height

TTab	See also

Indicates the vertical size of the tab in pixels.

property Height: Integer;

Description

Height is a read-only property that returns the height of the tab in pixels.


TTab.Highlighted
 CLX Reference

 TTab.Highlighted

TTab	See also

Indicates whether the tab sheet appears highlighted.

property Highlighted: Boolean;

Description

If Highlighted is true, the tab is painted using highlight colors, to make it stand out.


TTab.ImageIndex
 CLX Reference

 TTab.ImageIndex

TTab	See also

Identifies the image that appears next to the text on the tabn.

property ImageIndex: TImageIndex;

Description

Use ImageIndex to specify an image that appears next to the caption. ImageIndex is the (0-offset) index of the image in the TCustomImageList component that is available through the tab control’s Images property.


TTab.Left
 CLX Reference

 TTab.Left

TTab	See also

Returns the horizontal position of the tab’s left edge.

property Left: Integer;

Description

Left is a read-only property that returns the number of pixels between the left edge of the tab and the left edge of the tab control.


TTab.Row
 CLX Reference

 TTab.Row

TTab

Returns the tab row.

property Row: Integer;

Description

Row is a read-only property specifying the row that contains the tab. Rows are indexed from 0.


TTab.Selected
 CLX Reference

 TTab.Selected

TTab	See also

Selection status of tab

property Selected: Boolean;

Description

Use Selected to query or change individual tab selection. If the Selected property is true for more than one tab, the tab controls MultiSelect property is forced to true. To maintain single-selection behavior, used the tab control’s TabIndex property instead.

Multiple tab selections are allowed only if the tab control style is tsTabs. If a button style is used, selecting multiple tabs raises an EInvalidOperation error.


TTab.TabRect
 CLX Reference

 TTab.TabRect

TTab

Returns the bounding rectangle for the tab.

property TabRect: TRect;

Description

TabRect is a read-only property that returns the bounding rectangle for the tab with respect to the client area for the tab control.


TTab.Tabs
 CLX Reference

 TTab.Tabs

TTab	See Also

Returns the TTabs collection for this object.

property Tabs: TTabs;

Description

Tabs is a read-only property that returns the TTabs collection containing the object. This is the same object returned by the Collection property, except that it is cast to TTabs.


TTab.Top
 CLX Reference

 TTab.Top

TTab	See also

Returns the vertical position of the tab’s top edge.

property Top: Integer;

Description

Top is a read-only property that returns the number of pixels between the top edge of the tab and the top edge of the tab control.


TTab.Visible
 CLX Reference

 TTab.Visible

TTab

Specifies whether the tab is visible.

property Visible: Boolean;

Description

To hide a tab, set Visible to False.


TTab.Width
 CLX Reference

 TTab.Width

TTab	See also

Returns the tab width.

property Width: Integer;

Description

Width is a read-only property that returns the number of pixels between the edges of the tab.


 CLX Reference

TTab Methods

TTab	Alphabetically	Legend

In TTab

Assign

Create

GetDisplayName

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


 CLX Reference

TTab Methods

TTab	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


TTab.Assign
 CLX Reference

 TTab.Assign

TBitmap	See also

Copies essential properties of tab item.

procedure Assign(Source: TPersistent); override;

Description

Assign copies the essential properties of Source, which should be a TTab object. Properties copied are: Alignment, Caption, Enabled, and TabRect.


TTab.Create
 CLX Reference

 TTab.Create

TTab	See also

Creates and initializes a TTab instance.

constructor Create(Collection: TCollection); virtual;

Description

The Create method takes as a parameter the name of a TCollection instance. Create is called by TTabs.Add.


TTab.GetDisplayName
 CLX Reference

 TTab.GetDisplayName

TTab	See also

Returns name used in Object Inspector.

function  GetDisplayName: string; override;

Description

GetDisplayName returns the string used to refer to the tab in the object inspector. This is the caption, if one is defined; otherwise the class name is used.


Hierarchy

TObject

TPersistent

TCollectionItem

TTab


TTabs
 CLX Reference

TTabs

Hierarchy	Properties	Methods	See also

TTabs objects are containers for TTab objects.

Unit

QComCtrls

Description

Each TTabs object represents a collection of TTab objects in a TCustomTabControl. At design time, use the list-view control’s Tabs editor to add, remove, or modify tabs.


 CLX Reference

TTabs Properties

TTabs	Alphabetically	Legend

In TTabs

Items

TabControl

Derived from TCollection

Count

ItemClass


 CLX Reference

TTabs Properties

TTabs	By Object	Legend

Count

ItemClass

Items

TabControl


TTabs.Items
 CLX Reference

TTabs.Items

TTabs	See also

Provides indexed access to the items in the collection.

property Items[Index: Integer]: TTab;

Description

Use Items to access individual tabs in the collection. Indexes start at zero. The value of the Index parameter corresponds to the TabIndex property of TCustomTabControl.


TTabs.TabControl
 CLX Reference

TTabs.TabControl

TTabs	See also

Returns TCustomTabControl associated with TTabs object..

property TabControl: TCustomTabControl;

Description

TabControl is a read-only property that returns the tab control associated with the TTabs collection.


 CLX Reference

TTabs Methods

TTabs	Alphabetically	Legend

In TTabs

Add

Create

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


 CLX Reference

TTabs Methods

TTabs	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

GetOwner

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException

Update


TTabs.Add
 CLX Reference

TTabs.Add

TTabs

Creates a new TTab instance and adds it to the TTabs collection.

function Add(ACaption: string): TTab;

;

Description

Call Add to create a new tab with the specified caption. The new tab is added at the end of the collection. Add returns the new TTab object.


TTabs.Create
 CLX Reference

TTabs.Create

TTabs

Instantiate a TTabs object.

constructor Create(TabControl: TCustomTabControl);

Description

Create constructs a new instance of TTabs associated with the specified TCustomTabControl. This constructor is designed to be called from the constructor of the associated control, and should not be called in application code.


TTabs.GetOwner
 CLX Reference

TTabs.GetOwner

TTabs	See Also

Return component owner.

function GetOwner: TPersistent; override;

Description

For internal reasons, GetOwner is re-implemented in TTabs. GetOwner returns the associated TCustomTabControl.


TTabs.Update
 CLX Reference

TTabs.Update

TTabs	See Also

Update associated tab control.

procedure Update(Item: TCollectionItem); override;

Description

Update is a protected method that is called when one or more tabs have changed. If Item is nil, Update calls the Update method of the associated tab control. If Item is not nil, it should refer to one of the collection’s TTab objects; in this case, TCustomTabControl.CalculateRows is called for the row containing the tab.


Hierarchy

TObject

TPersistent

TCollection

TTabs


TTextBrowser
 CLX Reference

TTextBrowser

Hierarchy	Properties	Methods	Events	See also

Rich text control with hypertext features

Unit

QComCtrls

Description

TTextBrowser is a basic implementation of the rich text control defined in TCustomTextBrowser.


 CLX Reference

TTextBrowser Properties

TTextBrowser	Alphabetically	Legend

Derived from TCustomTextBrowser

Handle

Derived from TCustomTextViewer

ChildHandle

DocumentTitle

Factory

FileName

IsTextSelected

LinkColor

Paper

SelectedText

TextColor

TextFormat

UnderlineLink

Derived from TFrameControl

BorderStyle

ClientOrigin

Derived from TWidgetControl

Brush

ClientRect

ControlCount

Controls

Enabled

Parent

ParentWidget

Showing

TabOrder

TabStop

Derived from TControl

Action

Align

Anchors

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DragMode

Height

HelpContext

HelpKeyword

HelpType

Hint

Left

Name

ParentShowHint

PopupMenu

ShowHint

Top

Visible

Width

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TTextBrowser Properties

TTextBrowser	By Object	Legend

Action

Align

Anchors

BorderStyle

BoundsRect

Brush

ChildHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DocumentTitle

DragMode

Enabled

Factory

FileName

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

IsTextSelected

Left

LinkColor

Name

Owner

Paper

Parent

ParentShowHint

ParentWidget

PopupMenu

SelectedText

ShowHint

Showing

TabOrder

TabStop

Tag

TextColor

TextFormat

Top

UnderlineLink

Visible

Width


 CLX Reference

TTextBrowser Events

TTextBrowser	Alphabetically	Legend

Derived from TCustomTextBrowser

OnHighlightText

OnTextChanged

Derived from TWidgetControl

OnEnter

OnExit

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 CLX Reference

TTextBrowser Events

TTextBrowser	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnHighlightText

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag

OnTextChanged


 CLX Reference

TTextBrowser Methods

TTextBrowser	Alphabetically	Legend

Derived from TCustomTextBrowser

Backward

CanGoBackward

CanGoForward

Forward

Home

LoadFromFile

ScrollToAnchor

Derived from TCustomTextViewer

CopyToClipboard

Create

Destroy

LoadFromStream

SelectAll

Derived from TFrameControl

ContentsRect

Derived from TWidgetControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

InvalidateRect

InvokeHelp

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

AfterConstruction

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetParentComponent

HasParent

Hide

InitiateAction

ParentToClient

Refresh

ScreenToClient

SendToBack

SetBounds

Show

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

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


 CLX Reference

TTextBrowser Methods

TTextBrowser	By Object	Legend

AfterConstruction

Assign

Backward

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

CanGoBackward

CanGoForward

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ContentsRect

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DragDrop

Dragging

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Forward

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

HandleAllocated

HandleNeeded

HasParent

Hide

Home

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateRect

InvokeHelp

IsImplementorOf

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

ParentToClient

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollToAnchor

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

Show

Update

UpdateAction

UpdateControlState


Hierarchy

TObject

TPersistent

TComponent

TControl

TWidgetControl

TFrameControl

TCustomTextViewer

TCustomTextBrowser

TTextBrowser


Date-Time Format Strings
 CLX 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.
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
 CLX Reference

DWORD type

See also

DWORD represents a four-byte integer.

Unit

Types

type DWORD = Longword;

Description

DWORD (double word) is used to represent a four-byte integer.


Int64Rec type
 CLX 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
 CLX 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.


TActionEvent type
 CLX Reference

TActionEvent type

See also

The type of events that occur when processing actions.

Unit

QActnlist

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.


TAlign, TAlignSet type
 CLX Reference

TAlign type

See also

Specifies an alignment.

Unit

QControls

type TAlign = (alNone, alTop, alBottom, alLeft, alRight, alClient, alCustom);

Description

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
 CLX 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
 CLX Reference

TAnchorKind, TAnchors type

Specifies how a control is anchored to its parent.

Unit

QControls

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.


TBandInfoEvent type
 CLX Reference

TBandInfoEvent type

See also

The type of the OnBandInfo event handler.

Unit

QExtCtrls

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
 CLX Reference

TBandMoveEvent type

The type of the OnBandMove event handler.

Unit

QExtCtrls

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
 CLX Reference

TBandPaintEvent type

The type of the OnBandPaint event handler.

Unit

QExtCtrls

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
 CLX Reference

TBandPaintOption, TBandPaintOptions type

Used in the OnBandPaint event handler to specify which parts of a band are painted.

Unit

QExtCtrls

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.


TBeforeDrawButtonEvent type
 CLX Reference

TBeforeDrawButtonEvent type

TBeforeDrawButtonEvent is the type of several event handlers that allow a TStyle object to customize the way a button is drawn.

Unit

QStyle

type TBeforeDrawButtonEvent = procedure(Sender, Source: TObject; Canvas: TCanvas; var DefaultDraw: Boolean) ofobject;

Description

TBeforeDrawButtonEvent has the following parameters:

Sender is the TStyle object that receives the event.

Source is the button object that is being drawn.

Canvas is the canvas on which to draw the buttons image.

DefaultDraw indicates whether the default rendering of the button should proceed after the event handler exits. If the event handler finishes drawing the button, it sets DefaultDraw to False to prevent any further painting.


TButtonRectEvent type
 CLX Reference

TButtonRectEvent type

TButtonRectEvent is the type of event handlers that allow a TStyle object to indicate what portion of a widget is used for drawing a specific aspect of the widget.

Unit

QStyle

type TButtonRectEvent = procedure(Sender: TObject; var Rect: TRect) ofobject;

Description

TButtonRectEvent has the following parameters:

Sender is the TStyle object that receives the event.

Rect represents the dimensions that the event handler must provide. On entry, Rect is set to the dimensions of the entire widget. The event handler adjusts this value to indicate the dimensions of a particular part of the widget.


TBevelCut type
 CLX Reference

TBevelCut type

See also

Specifies a bevel’s cut.

Unit

QControls

type TBevelCut = (bvNone, bvLowered, bvRaised);

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.


TBevelEdge,TBevelEdges type
 CLX Reference

TBevelEdge, TBevelEdges type

Specifies which edges of a window are beveled.

Unit

QControls

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.


TBevelWidth type
 CLX Reference

TBevelWidth type

Contains a bevel width.

Unit

QExtCtrls

type TBevelWidth = 1..MaxInt;

Description

Use TBevelWidth to specify the width of a bevel in pixels.


TBorderWidth type
 CLX Reference

TBorderWidth type

Represents the width of a control’s border.

Unit

QExtCtrls

type TBorderWidth = 0..MaxInt;

Description

Use TBorderWidth to specify the width of a border in pixels.


TButtonLayout type
 CLX Reference

TButtonLayout type

See also

TButtonLayout defines values for the Layout property of buttons.

Unit

QButtons

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.


TByteArray type
 CLX 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.


TCallDesc type, PCallDesc type
 CLX 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
 CLX Reference

TCanResizeEvent type

The type of the OnCanResize event handler.

Unit

QExtCtrls

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
 CLX Reference

TCaption type

The type of the Caption property.

Unit

QTypes

type TCaption = type WideString;

Description

TCaption is the string that represents the caption of a control.


TCaretPos type
 CLX Reference

TCaretPos type

TCaretPos represents a line and column in a memo control.

Unit

QStdCtrls

type

  TCaretPos = record

    Line,

    Col: Integer;

end;

Description

TCaretPos represents a position in a memo control. It is used to indicate the current position or one endpoint of the selected text.

Line is the line of the memo control.

Col is a column (character position) within that line.


TColor type
 CLX Reference

TColor type

TColor is used to specify the color of an object.

Unit

QGraphics

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 to either directly to the closest matching color in the system palette (for example, clBlue maps to blue) or to the corresponding system screen element colors (for example, clNormalButton maps to the system color for button faces). In addition, there are a set of compatibility constants that map to system constants but have names to match system constants for the Windows-based colors.

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 followed by the compatibility constants, while the last two columns list the system color constants. The are defined in terms of the BaseColor of the current palette.

Value	Meaning		Value	Meaning
clNone	White.		clForeground	Base foreground color (for example, the color of lines or text).
clAqua	Aqua		clNormalForeground	Foreground color for enabled inactive controls.
clBlack	Black		clDisabledForeground	Foreground color for disabled controls.
clBlue	Blue		clActiveForeground	Foreground color for active controls.
clDkGray	Dark Gray		clBackground	Base background color.
clFuchsia	Fuchsia		clNormalBackground	Background color for enabled inactive controls.
clGray	Gray		clBase	Base background color for Text controls.
clGreen	Green		clNormalBase	Background color for enabled, inactive text controls
clLime	Lime green		clDisabledBase	Background color for disabled text controls.
clLtGray	Light Gray		clActiveBase	Background color for active text controls.
clMaroon	Maroon		clText	Base Foreground color for text controls
clNavy	Navy blue		clNormalText	Foreground color for enabled inactive text controls
clOlive	Olive green		clDisabledText	Foreground color for disabled text controls.
clPurple	Purple		clActiveText	Foreground color for active text controls
clRed	Red		clButton	Base background color for button controls.
clSilver	Silver		clNormalButton	Background color for enabled inactive button controls.
clTeal	Teal		clDisabledButton	Background color for disabled button controls.
clWhite	White		clActiveButton	Background color for active button controls.
clYellow	Yellow		clButtonText	Base foreground color for button controls.
			clNormalButtonText	Foreground color for enabled inactive button controls.
clScrollBar	maps to clButton		clDisabledButtonText	Foreground color for disabled button controls.
clActiveCaption	maps to clActiveHighlightedText		clActiveButtonText	Foreground color for active button controls.
clInactiveCaption	maps to DisabledHighlightedText		clBrightText	Base contrasting text color
clMenu	maps to clMid		clNormalBrightText	Contrasting text color for enabled inactive controls.
clWindow	maps to clBase		clDisabledBrightText	Contrasting text color for disabled controls
clWindowFrame	maps to clHighlight		clActiveBrightText	Contrasting text color for active controls
clMenuText	maps to clButtonText		clHighlight	Base color for selected or highlighted items.
clWindowText	maps to clText		clNormalHighlight	Background color for enabled inactive selected or highlighted items.
clCaptionText	maps to clHighlightedText		clDisabledHighlight	Background color for disabled selected or highlighted items
clActiveBorder	maps to clActiveHighlight		clActiveHighlight	Background color for active selected or highlighted items.
clInactiveBorder	maps to clDisabledHighlight		clHighlightedText	Base foreground color for selected or highlighted items.
clAppWorkspace	maps to clMid		clNormalHighlightedText	Foreground color for enabled inactive selected or highlighted items.
clBtnFace	maps to clButton		clDisabledHighlightedText	Foreground color for disabled selected or highlighted items
clBtnShadow	maps to clDark		clActiveHighlightedText	Foreground color for active selected or highlighted items.
clGrayText	maps to clLight		clLight	Base color for light areas in 3-D effects
clBtnText	maps to clButtonText		clNormalLight	Light color in 3D effects on enabled inactive controls.
clInactiveCaptionText	maps to clDisabledHighlightedText		clDisabledLight	Light color in 3D effects on disabled controls.
clBtnHighlight	maps to clBrightText		clActiveLight	Light color in 3D effects on active controls.
cl3DDkShadow	maps to clMid		clMidlight	Base color for light (but darker than clLight) areas in 3-D effects
cl3DLight	maps to clMidlight		clNormalMidlight	Light (but darker than clNormalLight) color in 3D effects on enabled inactive controls.
clInfoText	maps to clText		clDisabledMidlight	Light (but darker than clDisabledLight) color in 3D effects on disabled controls.
clInfoBk	light brown		clActiveMidlight	Light (but darker than clActiveLight) color in 3D effects on active controls.
clHighlightText	maps to clHighlightedText		clMid	Base color for dark (but lighter than clDark) areas in 3-D effects
clMask	maps to clBlack; used to define control masks		clNormalMid	Dark (but lighter than clNormalDark) color in 3D effects on enabled inactive controls.
clDontMask	maps to clWhite; used to define control masks		clDisabledMid	Dark (but lighter than clDisabledDark) color in 3D effects on disabled controls.
			clActiveMid	Dark (but darker than clActiveDark) color in 3D effects on active controls.
			clDark	Base color for dark areas in 3-D effects
			clNormalDark	Dark color in 3D effects on enabled inactive controls.
			clDisabledDark	Dark color in 3D effects on disabled controls.
			clActiveDark	Dark color in 3D effects on active controls.
			clShadow	Base color for darkest areas in 3-D effects
			clNormalShadow	Darkest color in 3D effects on enabled inactive controls.
			clDisabledShadow	Darkest color in 3D effects on disabled controls.
			clActiveShadow	Darkest color in 3D effects on active controls.


TColorGroup type
 CLX Reference

TColorGroup type

See also

TColorGroup is used to specify a group of colors that are used to paint objects in a specific state.

Unit

QGraphics

type TColorGroup = (cgInactive, cgDisabled, cgActive);

Description

Each palette generates a set of symbolic colors that reflect both a color group and a color role. TColorGroup is used to indicate the group of a symbolic color constant. It can have any of the following values:

Group	Meaning

cgInactive	Color is used on inactive controls.

cgDisabled	Color is used on disabled controls.

cgActive	Color is used on active controls.


TColorRole type
 CLX Reference

TColorRole type

See also

TColorRole is used to specify the use of a color when painting a control.

Unit

QGraphics

type TColorRole = (crForeground, crButton, crLight, crMidlight, crDark, crMid, crText, crBrightText, crButtonText, crBase, crBackground, crShadow, crHighlight, crHighlightText, crNoRole);

Description

Each palette generates a set of symbolic colors that reflect both a color group and a color role. TColorRole is used to indicate the use of the color (what part of the control is being painted). The following table lists the possible values:

Role	Meaning

crForeground	Foreground color (for example, the color of lines or text).

crButton	Background color for button controls.

crLight	Lightest areas in 3-D effects

crMidlight	Light (but darker than crLight) areas in 3-D effects

crDark	Dark areas in 3-D effects

crMid	Dark (but lighter than crDark) areas in 3-D effects

crText	Foreground color on text controls (color of the font).

crBrightText	Bright contrasting text color.

crButtonText	Foreground color for the caption on buttons.

crBase	Background color for text controls.

crBackground	Background color (for example, the color of a window)

crShadow	Darkest areas in 3-D effects.

crHighlight	Background color for selected or highlighted items.

crHighlightText	Foreground color for selected or highlighted items.

crNoRole	Unspecified role


TComboBoxStyle type
 CLX Reference

TComboBoxStyle type

TComboBoxStyle is the type for the Style property of combobox components.

Unit

QStdCtrls

type TComboBoxStyle = (csDropDown, csDropDownList);

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.

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.


TComponentName type
 CLX 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
 CLX Reference

TConstrainedResizeEvent type

The type of the OnConstrainedResize event handler.

Unit

QControls

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.


TCursor type
 CLX Reference

TCursor type

See also

TCursor represents a mouse cursor image.

Unit

QControls

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
 CLX Reference

TCustomDrawStage type

Used to specify a stage in the custom drawing process.

Unit

QComCtrls

type TCustomDrawStage = (cdPrePaint, cdPostPaint);

Description

Use TCustomDrawStage to determine when an advanced custom drawing event occurs:

Value	Meaning

cdPrePaint	Before painting.

cdPostPaint	After painting.


TCustomDrawState type
 CLX Reference

TCustomDrawState type

Used to specify a custom drawing state.

Unit

QComCtrls

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.


TDateTime type
 CLX 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.


TDragMode type
 CLX Reference

TDragMode type

Indicates how a control initiates drag-and-drop operations.

Unit

QControls

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
 CLX Reference

TDragState type

Used to specify how the mouse is moving in relation to a control.

Unit

QComCtrls

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.


TDrawItemEvent type
 CLX Reference

TDrawItemEvent type

The type of an OnDrawItem event handler.

Unit

QStdCtrls

type TDrawItemEvent = procedure(Sender: TObject; Index: Integer Rect: TRect; State: TOwnerDrawState; var Handled:Boolean) of object;

Description

TDrawItemEvent includes the following parameters:

Sender	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.

Handled	The event handler sets this parameter to True if it draws the item, False if the control should perform its default drawing after the event handler exits.


TDrawMaskEvent type
 CLX Reference

TDrawMaskEvent type

TDrawMaskEvent is the type of event handlers that allow a TStyle object to provide a mask that allows parts of a widget to be transparent.

Unit

QStyle

type TDrawMaskEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect) ofobject;

Description

TDrawMaskEvent is the type of event handlers that draw a mask onto a canvas. The mask indicates what portions of the specifies rectangle appear transparent. This allows widgets to take on non-rectangular shapes by masking out the portions that are not included in the widget’s image.

Sender is the TStyle object that receives the event.

Canvas is the canvas on which to draw the mask.

Rect represents the dimensions of the entire widget. The mask is drawn over Rect, masking out the portions that should appear transparent.


TDrawTabEvent type
 CLX Reference

TDrawTabEvent type

The type of the TCustomTabControl.OnDrawTab event handler.

Unit

QComCtrls

type TDrawTabEvent = procedure(Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect; Active: Boolean; var DefaultDraw: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.

DefaultDraw indicates whether the default painting of the tab should continue after the event handler exits.


TDrawTabEvent type
 CLX Reference

TDrawTabEvent type

TDrawTabEvent is the type of event handlers that allow a TStyle object to customize the way a tab in a tabbed control is drawn.

Unit

QStyle

type TDrawTabEvent = procedure(Sender, Source: TObject; Canvas: TCanvas; Index, HorizontalPadding, VerticalPadding, Overlap: Integer; Selected: Boolean) ofobject;

Description

TDrawTabEvent has the following parameters:

Sender is the TStyle object that receives the event.

Source is the tab control that contains the tab.

Canvas is the canvas on which to draw the tab image.

Index is the index of the tab to paint.

HorizontalPadding indicates the distance, in pixels, between the tab edge and the tab label.

VerticalPadding indicates the distance, in pixels, between the top edge of the tab and the tab label.

Overlap indicates the number of pixels by which the tabs overlap each other.

Selected indicates whether this tab is selected.


TDrawTrackBarEvent type
 CLX Reference

TDrawTrackBarEvent type

TDrawTrackBarEvent is the type of event handlers that allow a TStyle object to customize the way a track bar is drawn.

Unit

QStyle

type TDrawTrackBarEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; Horizontal, TickAbove, TickBelow: Boolean; var DefaultDraw: Boolean) ofobject;

Description

TDrawTrackBarEvent has the following parameters:

Sender is the TStyle object that receives the event.

Canvas is the canvas on which to draw the track bar.

Rect specifies the dimensions of the track bar on Canvas.

Horizontal indicates whether the track bar has a horizontal, rather than vertical, orientation.

TickAbove indicates whether the track bar has tick marks that appear above the slider groove.

TickBelow indicates whether the track bar has tick marks that appear below the slider groove.

DefaultDraw indicates whether the default rendering of the track bar should proceed after the event handler exits.


TDrawTrackBarGrooveEvent type
 CLX Reference

TDrawTrackBarGrooveEvent type

TDrawTrackBarGrooveEvent is the type of event handlers that allow a TStyle object to customize the way the groove in a track bar is drawn.

Unit

QStyle

type TDrawTrackBarGrooveEvent = procedure(Sender: TObject; Canvas: TCanvas; const Rect: TRect; Horizontal: Boolean; var DefaultDraw: Boolean) ofobject;

Description

TDrawTrackBarGrooveEvent has the following parameters:

Sender is the TStyle object that receives the event.

Canvas is the canvas on which to draw the track bar groove.

Rect specifies the dimensions of the track bar groove on Canvas.

Horizontal indicates whether the track bar has a horizontal, rather than vertical, orientation.

DefaultDraw indicates whether the default rendering of the track bar groove should proceed after the event handler exits.


TDuplicates type
 CLX 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
 CLX Reference

TEdgeBorder, TEdgeBorders type

TEdgeBorders is the type of the EdgeBorders property.

Unit

QGraphics

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.

In addition to the values in the preceding table, the QGraphics unit defines the ebRect constant to represent all the edges of a control:

const ebRect = [ebLeft, ebTop, ebRight, ebBottom];


TEdgeStyle type
 CLX Reference

TEdgeStyle type

TEdgeStyle describes the appearance of an edge border.

Unit

QGraphics

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
 CLX Reference

TEditMask type

Represents the mask that validates and formats user input.

Unit

QMask

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, 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.


TEndDragEvent type
 CLX Reference

TEndDragEvent type

Used for OnEndDrag event handlers.

Unit

QControls

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 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
 CLX 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 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
 CLX 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 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TFontCharset type

TFontCharset represents the character set of a font.

Unit

QGraphics

type TFontCharSet = ( fcsLatin1, fcsAnyCharSet, fcsLatin2, fcsLatin3, fcsLatin4, fcsISO_8859_5, fcsISO_8859_6, fcsISO_8859_7, fcsISO_8859_8, fcsLatin5, fcsLatin6, fcsISO_8859_11, fcsISO_8859_12, fcsLatin7, fcsLatin8, fcsLatin9, fcsKOI8R, fcsSet_Ja, fcsSet_Ko, fcsSet_Th_TH, fcsSet_Zh, fcsSet_Zh_TW, fcsUnicode);

Description

Each 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.


TFormBorderStyle type
 CLX Reference

TFormBorderStyle type

TFormBorderStyle is the type of the BorderStyle property for Forms and windows.

Unit

QForms

type TFormBorderStyle = (fbsNone, fbsSingle, fbsSizeable, fbsDialog, fbsToolWindow, fbsSizeToolWin);

Description

These are the possible values of the TFormBorderStyle type:

Value	Meaning

fbsNone	No visible border.

fbsSingle	Single-line border.

fbsSizeable	Standard resizable border.

fbsDialog	Standard dialog box border.

fbsToolWindow	Like fbsSingle but with a smaller caption.

fbsSizeToolWin	Like fbsSizeable but with a smaller caption.

Note:	Depending on the Window manager, some of these borders may result in a window that is not resizeable.


TBorderStyle type
 CLX Reference

TBorderStyle type

TBorderStyle is the type of the BorderStyle property for framed controls.

Unit

QControls

type TBorderStyle = (bsNone, bsSingle, bsDouble, bsRaisedPanel, bsSunkenPanel, bsRaised3d, bsSunken3d, bsEtched, bsEmbossed);

Description

These are the possible values of the TBorderStyle type:

Value	Meaning

bsNone	No visible border.

bsSingle	Single-line border.

bsDouble	Double-line border.

bsRaisedPanel	Border uses a 3-d effect to make the client area appear raised.

bsSunkenPanel	Border uses a 3-d effect to make the client area appear sunken.

bsRaised3d	Border is a raised bevel.

bsSunken3d	Border is a sunken bevel.

bsEtched	Border appears as an etched line.

bsEmbossed	Border appears as an embossed line.


TControlBorderStyle type
 CLX Reference

TControlBorderStyle type

TControlBorderStyle is a subset of TBorderStyle that applies to controls.

Unit

QControls

type TControlBorderStyle = bsNone .. bsSingle;

Description

These are the possible values of the TControlBorderStyle type:

Value	Meaning

bsNone	No visible border.

bsSingle	Single-line border.


TGetChildProc type
 CLX 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.


TGetStrProc type
 CLX 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
 CLX Reference

TGridAxisDrawInfo, TGridDrawInfo type

Represents information that is useful when rendering a grid.

Unit

QGrids

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
 CLX Reference

TGridDrawState type

TGridDrawState represents information that is useful when rendering the cell of a grid.

Unit

QGrids

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
 CLX Reference

TGridState type

TGridState indicates any user actions that are currently changing the layout of the grid.

Unit

QGrids

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.


THelpContext type
 CLX Reference

THelpContext type

Represents a Help context ID.

Unit

Classes

type THelpContext = -MaxLongInt..MaxLongInt;

Description

The HyperHelp system associates each help topic with a unique number, or context ID. An application identifies the topic to HyperHelp by passing this context ID.

THelpContext values are used both when associating controls, menu items, and dialogs with help topics and when invoking the help system.


THelpType type
 CLX 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
 CLX Reference

THintInfo type

See also

THintInfo is used to define the appearance and behavior of the Help window.

Unit

QControls

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
 CLX Reference

THitTest, THitTests type

Used in the GetHitTestInfoAt method.

Unit

QComCtrls

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.


TIdentToInt type
 CLX 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
 CLX 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.


TImageIndex type
 CLX Reference

TImageIndex type

See also

TImageIndex represents the index of an image in a TImageList component.

Unit

QImgList

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.


TInputKeys type
 CLX Reference

TInputKeys type

TInputKeys defines kinds of keyboard inputs.

Unit

QControls

TInputKey = (ikAll, ikArrows, ikChars, ikReturns, ikTabs, ikEdit, ikNav, ikEsc);

TInputKeys = set of TInputKey;

Description

The TInputKeys type defines possible kinds of keyboard inputs . TThis type is used by TWidgetControl.InputKeys. The following table lists the possible values:

Value	Meaning

ikAll	All keyboard inputs.

ikArrows	Arrow key inputs.

ikChars	Any non-function key used without CTRL or ALT modifier.

ikReturns	Enter or Return key input.

ikTabs	Tab or Backtab input.

ikEdit	Backspace, Insert, or Delete key input

ikNav 	Arrow, Home, End, Page Up, or Page Down key input.

ikEsc	Escape key input.


 CLX 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
 CLX 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
 CLX Reference

TItemChange type

See also

Describes what type of change a list item undergoes.

Unit

QComCtrls

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
 CLX Reference

TItemFind type

Used in the TCustomListView.OnDataFind event handler to specify a type of search.

Unit

QComCtrls

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
 CLX Reference

TItemState, TItemStates type

Used to specify the state of an item in a  view control.

Unit

QComCtrls

type

  TItemState = (isNone, isFocused, isSelected, isActivating);

  TItemStates = set of TItemState;

Description

TItemState indicates the state of an item in a  view. It can have any of the following values:

Value	Meaning

isNone	Item is in its default state

isFocused	Item is focused

isSelected	Item is selected

isActivating	Item is active


TListAssignOp type
 CLX 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.


TListBoxLayout type
 CLX Reference

TListBoxLayout type

Specifies how a list box lays out its rows and columns.

Unit

QStdCtrls

type TListBoxLayout = (llFixedNumber, llFitToWidth, llVariable);

Description

TListBoxLayout can have one of the following values:

Value	Meaning

llFixedNumber	There is a fixed number of columns or rows, as specified by the Columns or Rows property, respectively.

llFitToWidth	The number of columns (rows) is set to the maximum number that can fit within the width (height) of the list box and not truncate any items.

llVariable	The number of columns (rows) is as many as necessary to display all items given the limitations imposed by the TListBoxLayout setting in the other dimension.


TListViewDrawItemEvent type
 CLX Reference

TListViewDrawItemEvent type

Item drawing event handler.

Unit

QComCtrls

type TListViewDrawItemEvent = procedure(Sender: TCustomListView; Item: TListItem; Canvas: TCanvas; const Rect: TRect; State: TOwnerDrawState) ofobject;

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.

Canvas is the canvas used to render the item.

Rect defines the coordinates of the item on the canvas.

State indicates various conditions that can influence how the item is drawn, such as whether it is selected, grayed, or focused.


TListViewItemType type
 CLX 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
 CLX 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 xfm”.

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”.


TLVNotifyEvent type
 CLX Reference

TLVNotifyEvent type

The type of an OnGetImageIndex event handler.

Unit

QComCtrls

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.


TLVSelectItemEvent type
 CLX Reference

TLVSelectItemEvent type

See also

Used in the TCustomListView.OnSelectItem event.

Unit

QComCtrls

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
 CLX 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 multi-byte character.  The value of Char must be included in the LeadBytes set.

mbTrailByte	The Char is used to represent one of the trailing bytes in a multi-byte character. There are no a priori restrictions on the value of Char.


TMemoryManager type
 CLX 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.


TMenuItemAutoFlag, TMenuAutoFlag type
 CLX Reference

TMenuItemAutoFlag, TMenuAutoFlag type

See also

Indicates when menu items are automatically maintained.

Unit

QMenus

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
 CLX Reference

TMessage type

TMessage represents a broadcast message.

Unit

QControls

type

  TMessage =record

    Msg: Cardinal;

  end;

Description

The Msg field represents the Message code.


TMessageStyle type
 CLX Reference

TMessageStyle type

TMessageStyle identifies the purpose of a message box.

Unit

QControls

type TMessageStyle = (smsInformation, smsWarning, smsCritical);

Description

TMessageStyle is used to classify a message box based on its purpose. The following table lists the possible values:

Value	Meaning

smsInformation	The message box informs the user of something that happens in the course of normal operation.

smsWarning	The message box warns the user of the consequences of what is happening.

smsCritical	The message box provides the user of critical information. Typically, this is the result of an exception or error.


TMethod type
 CLX 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
 CLX Reference

TModalResult type

See also

TModalResult represents the return value from a modal dialog.

Unit

QForms

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. For convenience, the QControls unit defines a set of constants for commonly used TModalResult values:

Constant	Value	Meaning

mrNone	0	None. Used as a default value before the user exits.

mrOk	1	The user exited with OK button.

mrCancel	2	The user exited with the CANCEL button.

mrYes	3	The user exited with the YES button.

mrNo	4	The user exited with the NO button.

mrAbort	5	The user exited with the ABORT button.

mrRetry	6	The user exited with the RETRY button.

mrIgnore	7	The user exited with the IGNORE button.

mrAll	8	The user exited with the ALL button.

mrNoToAll	9	The user exited with the NO TO ALL button.

mrYesToAll	10	The user exited with the YES TO ALL button.

Note:	If you are writing a cross-platform application, use the symbolic constants for the values in the table above. The numerical definitions of these constants differs between Windows and Linux.


TMouseButton type
 CLX Reference

TMouseButton type

See also

TMouseButton identifies a mouse button in a mouse-event handler.

Unit

QControls

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
 CLX Reference

TMouseWheelEvent type

The type of the OnMouseWheel event handler.

Unit

QControls

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
 CLX Reference

TMouseWheelUpDownEvent type

See also

Used in the OnMouseWheelUp and OnMouseWheelDown events.

Unit

QControls

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
 CLX Reference

TMsgDlgBtn, TMsgDlgButtons type

TMsgDlgButtons defines a set of values used by MessageDlg and MessageDlgPos.

Unit

QDialogs

type

  TMsgDlgBtn = (mbNone, mbOk, mbCancel, mbYes, mbNo, mbAbort, mbRetry, mbIgnore);

  TMsgDlgButtons = set of TMsgDlgBtn;

const

  mbYesNoCancel = [mbYes, mbNo, mbCancel];

  mbYesNo = [mbYes, mbNo];

  mbOKCancel = [mbOK, mbCancel];

  mbAbortRetryIgnore = [mbAbort, mbRetry, 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

mbNone	Used to indicate no button in particular (when specifying that there is no default button)

mbOk	A button the text 'Ok' on its face.

mbCancel	A button with the text 'Cancel' on its face.

mbYes	A button with 'Yes' on its face.

mbNo	A button the text 'No' 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

In addition, the Dialogs unit defines the following constants for commonly used TMsgDlgButtons values:

Constant	Meaning

mbYesNoCancel	mbYes, mbNo, and mbCancel

mbYesNo	mbYes, mbNo

mbOKCancel	mbOK and mbCancel

mbAbortRetryIgnore	mbAbort, mbRetry, and mbIgnore


TMsgDlgType type
 CLX Reference

TMsgDlgType type

TMsgDlgType defines values describing the type of message box.

Unit

QDialogs

type TMsgDlgType = (mtCustom, mtInformation, mtWarning, mtError, mtConfirmation);

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

mtCustom	A message box with a caption you supply (or, if you do not supply a caption, with the application title for a caption.)

mtInformation	A message box with the caption ‘Information’.

mtWarning	A message box with the caption ‘Warning’.

mtError	A message box with the caption ‘Error’.

mtConfirmation	A message box with the caption ‘Confirm’ that asks for confirmation before performing some action. If you do not supply an image to appear in the message box, it displays the confirmation icon.


TNodeAttachMode type
 CLX Reference

TNodeAttachMode type

TNodeAttachMode identifies a  changed tree node relationship.

Unit

QComCtrls

type TNodeAttachMode = (naAdd, naAddFirst, naAddChild, naAddChildFirst, naInsert);

Description

The TNodeAttachMode type specifies the way a relocated tree node will be related to some other node.

Value	Meaning

naAdd	The relocated node becomes the last sibling of the other node.

naAddFirst	The relocated node becomes the first sibling of the other node.

naInsert	The relocated node becomes the sibling immediately before the other node.

naAddChild	The relocated node becomes the last child of the other node.

naAddChildFirst	The relocated node becomes the first child of the other node.


TNotifyEvent type
 CLX 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.


TOperation type
 CLX 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.


TOwnerDrawState type
 CLX Reference

TOwnerDrawState type

Indicates state information that can influence how an item is drawn.

Unit

QStdCtrls

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

odNoAccel	Any underline of an accelerator character should be skipped when drawing the control

odNoFocusRect	Do not display visual cues that indicate focus

odReserved1	Not currently used.

odReserved2	Not currently used.

odComboBoxEdit	The drawing takes place in the edit box of a combo box control.


TPackageInfoProc type
 CLX 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
 CLX 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.


TPaymentTime type
 CLX 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
 CLX 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.


TPolishEvent type
 CLX Reference

TPolishEvent type

TPolishEvent is the type of an OnPolish event handler.

Unit

QStyle

type TPolishEvent = procedure (Sender, Source: TObject) ofobject;

Description

The TPolishEvent type allows objects to perform any finishing touches to the appearance of an object before it is painted.

Sender is the TStyle object that determines the general “look and feel” of the object. This Style object influences the painting that is about to occur.

Source is the object that has just been created but not yet painted. When Sender is the application’s TStyle object, Source is the TApplication object.


TPopupAlignment type
 CLX Reference

TPopupAlignment type

TPopupAlignment represents the position of a popup menu relative to the mouse.

Unit

QMenus

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
 CLX 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
 CLX Reference

TProgressBarOrientation type

See also

Used to specify the orientation of a progress bar.

Unit

QComCtrls

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
 CLX 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
 CLX 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.


TScrollBarControl, TScrollBarControls types
 CLX Reference

TScrollBarControl, TScrollBarControls types

TScrollBarControl identifies one of the subcontrols in a scrollbar. TScrollBarControls is a set of TScrollBarControl values.

Unit

QStyle

type

  TScrollBarControl = (sbcAddButton, sbcSubButton, sbcAddPage, sbcSubPage, sbcSlider, sbcNone);

  TScrollBarControls = set of TScrollBarControl;

Description

TScrollBarControl identifies the parts of a scrollbar. It is used by TStyle components to identify the parts to include or draw. TScrollBarControls represents a set of TScrollBarControl values.

The following table lists the possible TScrollBarControl values:

Value	Meaning

sbcAddButton	The arrow button that increments the current position by one line when clicked.

sbcSubButton	The arrow button that decrements the current position by one line when clicked.

sbcAddPage	The portion of the scroll bar that increments the current position by one page when clicked.

sbcSubPage	The portion of the scroll bar that decrements the current position by one page when clicked.

sbcSlider	The thumb tab.

sbcNone	Used to designate no control (for example, to indicate when no part of the scroll bar has been depressed with the mouse).


TScrollBarKind type
 CLX Reference

TScrollBarKind type

Indicates the orientation of a scrollbar.

Unit

QForms

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.


TScrollCode type
 CLX Reference

TScrollCode type

Indicates what action the user performed on a scroll bar.

Unit

QForms

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
 CLX Reference

TScrollStyle type

Identifies a set of scrollbars by their orientation.

Unit

QStdCtrls

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
 CLX Reference

TSearchDirection type

Indicates the direction in which to search for the nearest item to a specified item or point.

Unit

QComCtrls

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
 CLX Reference

TSearchRec type

TSearchRec defines file information searched for by FindFirst or FindNext.

Unit

SysUtils

On Linux:

type TSearchRec = record
Time: Integer;
Size: Integer;
Attr: Integer;
Name: TFileName;
ExcludeAttr: Integer;
Mode: mode_t;
FindHandle: Pointer;
PathOnly: array [0..4096] of char;
Pattern: array [0..256] of char;
end;

On Windows:

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. On Windows, attribute constants map directly to DOS file attributes. On Linux, attribute constants map to sets of file characteristics; use the Mode field to access the specific permission mode.

Constant	Value	Description	Linux Meaning

faReadOnly	$00000001	Read-only files	Current user does not have write access.

faHidden	$00000002	Hidden files	File name begins with ".".

faSysFile	$00000004	System files	File is socket, symbolic link, device file, or FIFO.

faVolumeID	$00000008	Volume ID files	Not used.

faDirectory	$00000010	Directory files	Directory.

faArchive	$00000020	Archive files	Not used.

faAnyFile	$0000003F	Any file	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 (Windows only) contains additional information such as the file creation time, last access time, and both the long and short file names.

Mode (Linux only) is the file's permission mask.


TSectionNotifyEvent type
 CLX Reference

TSectionNotifyEvent type

See also

Describes user events in TCustomHeaderControl

Unit

QComCtrls

type

  TSectionNotifyEvent = procedure(HeaderControl: TCustomHeaderControl; Section: TCustomHeaderSection) of object;

Description

TSectionNotifyEvent is the type for event handlers that respond when the user initiates some action on the sections of a header control.

HeaderControl is the header control on which the user performed some action.

Section is the affected section (the section that was moved, clicked, or resized).


TSeekOrigin type
 CLX 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.


TShiftState type
 CLX 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
 CLX 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
 CLX Reference

TShortCutEvent type

The type of an OnShortCut event handler.

Unit

QForms

TShortCutEvent = procedure (Key: Integer; Shift: TShiftState; 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 Key parameter is the value of the key that was pressed.

The Shift parameter indicates the state of the Shift, Control, and Alt keys when the key was pressed.

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.


TSmallPoint type
 CLX 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.


TSocketErrorEvent type
 CLX 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
 CLX 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
 CLX 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
 CLX Reference

TSortDirection type

TSortDirection indicates ascending or descending sort.

Unit

QComCtrls

type TSortDirection = (sdAscending, sdDescending);

Description

Value	Meaning

sdAscending	Ascending sort order.

sdDescending	Descending sort order.


TSortType type
 CLX Reference

TSortType type

TSortType indicates the criteria to use when sorting items.

Unit

QComCtrls

type TSortType = (stNone, stText);

Description

Value	Meaning

stNone	No sorting is done.

stText	Items are sorted based on their Caption property.


TStreamOriginalFormat type
 CLX 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.


TSysCharSet type
 CLX 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
 CLX Reference

TSysLocale type

See also

TSysLocale represents locale information.

Unit

SysUtils

type TSysLocale = packed record

  DefaultLCID: LCID;

  PriLangID: LANGID;

  SubLangID: LANGID;

  FarEast: Boolean;

  MiddleEast: Boolean;

end;

Description

The TSysLocale type represents a 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 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 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 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.


TTabGetImageEvent type
 CLX Reference

TTabGetImageEvent type

See also

Used in the TCustomTabControl.OnGetImageIndex event.

Unit

QComCtrls

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
 CLX Reference

TTabStyle type

See also

Represents the appearance of the tabs in TPageControl or TTabControl object.

Unit

QComCtrls

type TTabStyle = (tsRounded, tsTriangular);

Description

TTabStyle can have one of the following values:

Value	Meaning

tsRounded	Tabs appear as rounded rectangles

tsTriangular	Tabs are triangular (typically used when Tabs appear below pages)


TTextLineBreakStyle type
 CLX 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
 CLX 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
 CLX 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): Pointer; stdcall;

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 BeginThread. 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.


TThreadAttr type
 CLX Reference

TThreadAttr type

See also

TThreadAttr contains information about a new thread of execution.

Unit

System

type

  PThreadAttr = ^TThreadAttr;

  TSize_T = Cardinal;

  TSchedParam = record

    sched_priority: Integer;

  end;

  TThreadAttr = record

    __detachstate,

    __schedpolicy: Integer;

    __schedparam: TSchedParam;

    __inheritsched,

    __scope: Integer;

    __guardsize: TSize_T;

    __stackaddr_set: Integer;

    __stackaddr: Pointer;

    __stacksize: TSize_T;

  end;

Description

TThreadAttr is used by the BeginThread function to represent information about a new thread of execution.


TTimeStamp type
 CLX 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.


TToggleState type
 CLX Reference

TToggleState type

See also

Represents the state of a button control

Unit

QStdCtrls

type TToggleState = (tsOff, tsNoChange, tsOn);

Description

TToggleState indicates the state of a button after the user makes a change. It can have any of the following values:

Value	Meaning

tsOff	The button is unselected (up, unchecked, etc.).

tsNoChange	The button’s selection is unchanged. (may correspond to blank or grayed)

tsOn	The button is selected (down, checked, etc.).


TTVExpandedEvent type
 CLX Reference

TTVExpandedEvent type

See also

Represents the event handler for events that notify a tree view of changes to one of its nodes.

Unit

QComCtrls

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, or deleted.


TTypeData type
 CLX 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
 CLX 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.


TVarRec type
 CLX 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
 CLX 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
 CLX 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
 CLX 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 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.


TVariantManager type
 CLX 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
 CLX 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
 CLX 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.


TWindowState type
 CLX Reference

TWindowState type

See also

TWindowState indicates whether a form is maximized, minimized, or normally sized.

Unit

QForms

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.


TWordArray type
 CLX 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
 CLX 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). UCS4String values can be used for calls to the Linux operating system.


UTF8String type
 CLX 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.


Key codes
 CLX Reference

Key codes

See also

Key codes provide a symbolic representation of user key presses.

Unit

Qt

Description

Key codes allow you to represent keyboard values for non-alphanumeric keys.Qt defines special constants for each key the user can press. These constants can then be used to refer to the keystroke in an OnKeyUp or OnKeyDown event handler.

The following table lists the  key codes defined in the Qt unit:

Virtual Key Code	Corresponding key

Key_Escape	Escape key

Key_Tab	Tab key

Key_Backtab, Key_BackTab	Backtab key

Key_Backspace, Key_BackSpace	Backspace key

Key_Return	Return key

Key_Enter	Enter key

Key_Insert	Insert key

Key_Delete	Delete key

Key_Pause	Pause key

Key_Print	Print key

Key_SysReq	SysReq key

Key_Home	Home key

Key_End	End key

Key_Left	Left key

Key_Up	Up key

Key_Right	Right key

Key_Down	Down key

Key_Prior 	Prior key

Key_PageUp	Page up key

Key_Next	Next key

Key_PageDown 	Page down key

Key_Shift	Shift key

Key_Control	CTRL key

Key_Meta	Meta key (often this is the same as the Alt key)

Key_Alt	Alt key

Key_CapsLock	Caps Lock key

Key_NumLock	Num Lock key

Key_ScrollLock	Scroll Lock key

Key_F1	F1 key

Key_F2	F2 key

Key_F3	F3 key

Key_F4	F4 key

Key_F5	F5 key

Key_F6	F6 key

Key_F7	F7 key

Key_F8	F8 key

Key_F9	F9 key

Key_F10	F10 key

Key_F11	F11 key

Key_F12	F12 key

Key_F13	F13 key

Key_F14	F14 key

Key_F15	F1 key

Key_F16	F16 key

Key_F17	F17 key

Key_F18	F18 key

Key_F19	F19 key

Key_F20	F20 key

Key_F21	F21 key

Key_F22	F22 key

Key_F23	F23 key

Key_F24	F24 key

Key_F25	F25 key

Key_F26	F26 key

Key_F27	F27 key

Key_F28	F28 key

Key_F29	F29 key

Key_F30	F30 key

Key_F31	F31 key

Key_F32	F32 key

Key_F33	F33 key

Key_F34	F34 key

Key_F35	F35 key

Key_Super_L	Super_L key

Key_Super_R	Super_R key

Key_Menu	Menu key

Key_Hyper_L	Hyper_L key

Key_Hyper_R	Hyper_R key

Key_Help	Help key

Key_Space, Key_Any	Space key

Key_Exclam	Exclamation mark key (!)

Key_QuoteDbl	Double quotes key( “ )

Key_NumberSign	Number sign key (#)

Key_Dollar	Dollar sign key ($)

Key_Percent	Percent key (%)

Key_Ampersand	Ampersand key (&)

Key_Apostrophe	Apostrophe key (‘)

Key_ParenLeft	Left parenthesis key (

Key_ParenRight	Right parenthesis key )

Key_Asterisk	Asterisk key (*)

Key_Plus	Plus sign key (+)

Key_Comma	Comma key (,)

Key_Minus	Minus sign key (-)

Key_Period	Period key (.)

Key_Slash	Slash key (/)

Key_0	0 key (numeric keypad)

Key_1	1 key (numeric keypad)

Key_2	2 key (numeric keypad)

Key_3	3 key (numeric keypad)

Key_4	4 key (numeric keypad)

Key_5	5 key (numeric keypad)

Key_6	6 key (numeric keypad)

Key_7	7 key (numeric keypad)

Key_8	8 key (numeric keypad)

Key_9	9 key (numeric keypad)

Key_Colon	Colon key (:)

Key_Semicolon	Semicolon key (;)

Key_Less	Less than key (<)

Key_Equal	Equal to key (=)

Key_Greater	Greater than key (>)

Key_Question	Question mark key (?)

Key_At	At key @

Key_A	A key

Key_B	B key

Key_C	C key

Key_D	D key

Key_E	E key

Key_F	F key

Key_G	G key

Key_H	H key

Key_I	I key

Key_J	J key

Key_K	K key

Key_L	L key

Key_M	M key

Key_N	N key

Key_O	O key

Key_P	P key

Key_Q	Q key

Key_R	R key

Key_S	S key

Key_T	T key

Key_U	U key

Key_V	V key

Key_W	W key

Key_X	X key

Key_Y	Y key

Key_Z	Z key

Key_BracketLeft	Left bracket key ( [ )

Key_Backslash	Backslash key (\)

Key_BracketRight	Right bracket key (])

Key_AsciiCircum	Ascii Circum key (^)

Key_Underscore	Underscore key (_)

Key_QuoteLeft	Left quote key (`)

Key_BraceLeft	Left brace key ({)

Key_Bar	Bar key (|)

Key_BraceRight	Right brace key (})

Key_AsciiTilde	Ascii Tilde key (~)

Key_nobreakspace	No break space key ( )

Key_exclamdown	Upside down exclamation mark key (¡)

Key_cent	Cent key (¢)

Key_sterling	Sterling pound key (£)

Key_currency	Currency key (¤)

Key_yen	Yen key (¥)

Key_brokenbar	Broken bar key (¦)

Key_section	Section key (§)

Key_diaeresis	Diaeresis key (¨)

Key_copyright	Copyright key (©)

Key_ordfeminine	Feminine key (ª)

Key_guillemotleft	Left angle quotation mark («)

Key_notsign	Not sign key (¬)

Key_hyphen	Hyphen key (­)

Key_registered	Registered key (®)

Key_macron	Macron key (¯)

Key_degree	degree key (°)

Key_plusminus	Plus minus key (±)

Key_twosuperior	Superscripted two key (²)

Key_threesuperior	Superscripted three key (³)

Key_acute	Acute key (´)

Key_mu	Mu key (µ)

Key_paragraph	Paragraph key (¶)

Key_periodcentered	Centered period key (·)

Key_cedilla	Cedilla key (¸)

Key_onesuperior	Superscripted one key (¹)

Key_masculine	Masculine key (º)

Key_guillemotright	Right angle quotation mark (»)

Key_onequarter	One-quarter key (¼)

Key_onehalf	One-half key (½)

Key_threequarters	Three-quarters key (¾)

Key_questiondown	Upside down question mark key (¿)

Key_Agrave	A grave key (À)

Key_Aacute	A acute key (Á)

Key_Acircumflex	A circumflex key (Â)

Key_Atilde	A tilde key (Ã)

Key_Adiaeresis	A diaeresis key (Ä)

Key_Aring	A ring key (Å)

Key_AE	AE key (Æ)

Key_Ccedilla	C cedilla key (Ç)

Key_Egrave	E grave key (È)

Key_Eacute	E acute key (É)

Key_Ecircumflex	E circumflex key (Ê)

Key_Ediaeresis	E diaeresis key (Ë)

Key_Igrave	I grave key (Ì)

Key_Iacute	I acute key (Í)

Key_Icircumflex	I circumflex key (Î)

Key_Idiaeresis	I diaeresis key (Ï)

Key_ETH	ETH key (Ð)

Key_Ntilde	N tilde key (Ñ)

Key_Ograve	O grave key (Ò)

Key_Oacute	O acute key (Ó)

Key_Ocircumflex	O circumflex key (Ô)

Key_Otilde	O tilde key (Õ)

Key_Odiaeresis	O diaeresis key (Ö)

Key_multiply	Multiply key (×)

Key_Ooblique	O oblique key (Ø)

Key_Ugrave	U grave key (Ù)

Key_Uacute	U acute key (Ú)

Key_Ucircumflex	U circumflex key (Û)

Key_Udiaeresis	U diaeresis key (Ü)

Key_Yacute	Y acute key (Ý)

Key_ssharp	S sharp key (ß)

Key_agrave	a grave key (à)

Key_aacute	a acute key (á)

Key_acircumflex	a circumflex key (â)

Key_atilde	a tilde key (ã)

Key_adiaeresis	a diaeresis key (ä)

Key_aring	a ring key (å)

Key_ae	Ae key (æ)

Key_ccedilla	c cedilla key (ç)

Key_egrave	e grave key (è)

Key_eacute	e acute key (é)

Key_ecircumflex	e circumflex key (ê)

Key_ediaeresis	e diaeresis key (ë)

Key_igrave	i grave key (ì)

Key_iacute	i acute key (í)

Key_icircumflex	i circumflex key (î)

Key_idiaeresis	i diaeresis key (ï)

Key_eth	eth key (ð)

Key_ntilde	n tilde key (ñ)

Key_ograve	o grave key (ò)

Key_oacute	o acute key (ó)

Key_ocircumflex	o circumflex key (ô)

Key_otilde	o tilde key (õ)

Key_odiaeresis	o diaeresis key (ö)

Key_division	Division sign key (÷)

Key_oslash	o slash key (ø)

Key_ugrave	u grave key (ù)

Key_uacute	u acute key (ú)

Key_ucircumflex	u circumflex key (û)

Key_udiaeresis	u diaeresis key (ü)

Key_yacute	y acute key (ý)

Key_thorn	Thorn key (þ)

Key_ydiaeresis	y diaeresis key (ÿ)

Key_unknown	Unknown key


WordRec type
 CLX 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.


 CLX Reference


About CLX Help

CLX help is a reference for all the objects, components, global routines, types, and variables that make up the cross-platform component library (CLX). 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 cross-platform component library (CLX). 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 CLX. 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 CLX Help includes examples for methods, properties, and events.

Examples 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.


TWidgetStyle
 CLX Reference

TWidgetStyle

Hierarchy	Properties	Methods	Events	See also

Specifies how to paint a widget in a CLX application.

Unit

QStyle

Description

TWidgetStyle represents the style used to paint an object in a CLX application. A style gives an application its “look and feel”.

Do not create instances of TWidgetStyle. It is the type of the protected Style property on an individual TWidgetControl object.


 CLX Reference

TWidgetStyle properties

TWidgetStyle	Alphabetically	Legend

In TWidgetStyle

DefaultStyle

Derived from TStyle

ButtonShift

CheckSize

DefaultFrameWidth

Handle

Hooks

MaxSliderDragDistance

RadioSize

SliderLength


 CLX Reference

TWidgetStyle properties

TWidgetStyle	By object	Legend

ButtonShift

CheckSize

DefaultFrameWidth

DefaultStyle

Handle

Hooks

MaxSliderDragDistance

RadioSize

SliderLength


TWidgetStyle.DefaultStyle
 CLX Reference

TWidgetStyle.DefaultStyle

TWidgetStyle

Specifies a predefined style configuration that is used by default.

type TDefaultStyle = (dsWindows, dsMotif, dsMotifPlus, dsCDE, dsQtSGI, dsPlatinum, dsSystemDefault);

property DefaultStyle: TDefaultStyle;

Description

Set DefaultStyle to use one of the predefined styles as a starting point for the style. Each DefaultStyle value represents a basic “look and feel” for the widget. You can further customize any of these styles by using the TWidgetStyle properties or supplying event handlers to the TWidgetStyle events.

Warning:	The value of DefaultStyle must be supported by the desktop on which the application is running.


 CLX Reference

TWidgetStyle events

TWidgetStyle	Alphabetically	Legend

In TWidgetStyle

OnPolish

Derived from TStyle

AfterDrawButton

AfterDrawItem

AfterDrawMenuItem

BeforeDrawButton

BeforeDrawItem

BeforeDrawMenuItem

ButtonRect

ComboButtonFocusRect

ComboButtonRect

DrawArrow

DrawButtonFrame

DrawButtonLabel

DrawButtonMask

DrawCheck

DrawCheckMask

DrawComboButton

DrawComboButtonMask

DrawFocusRect

DrawFrame

DrawHeaderSection

DrawHint

DrawMenuCheck

DrawMenuFrame

DrawRadio

DrawRadioMask

DrawScrollBar

DrawSplitter

DrawTab

DrawTabMask

DrawTrackBar

DrawTrackBarGroove

DrawTrackBarGrooveMask

DrawTrackBarMask

ExtraMenuItemWidth

GetItemRect

HeaderSectionRect

MenuItemHeight

OnChange

ScrollBarMetrics

SubmenuIndicatorWidth

TabMetrics


 CLX Reference

TWidgetStyle events

TWidgetStyle	By object	Legend

AfterDrawButton

AfterDrawItem

AfterDrawMenuItem

BeforeDrawButton

BeforeDrawItem

BeforeDrawMenuItem

ButtonRect

ComboButtonFocusRect

ComboButtonRect

DrawArrow

DrawButtonFrame

DrawButtonLabel

DrawButtonMask

DrawCheck

DrawCheckMask

DrawComboButton

DrawComboButtonMask

DrawFocusRect

DrawFrame

DrawHeaderSection

DrawHint

DrawMenuCheck

DrawMenuFrame

DrawRadio

DrawRadioMask

DrawScrollBar

DrawSplitter

DrawTab

DrawTabMask

DrawTrackBar

DrawTrackBarGroove

DrawTrackBarGrooveMask

DrawTrackBarMask

ExtraMenuItemWidth

GetItemRect

HeaderSectionRect

MenuItemHeight

OnChange

OnPolish

ScrollBarMetrics

SubmenuIndicatorWidth

TabMetrics


TWidgetStyle.OnPolish
 CLX Reference

TWidgetStyle.OnPolish

TWidgetStyle	See also

Occurs after the widget is created but before any painting has begun.

property OnPolish: TPolishEvent;

Description

Write an OnPolish event handler to set any properties of this style object or assign any event handlers before the application paints the widget to which this applies.


 CLX Reference

TWidgetStyle methods

TWidgetStyle	Alphabetically	Legend

In TWidgetStyle

Destroy

Derived from TStyle

Create

GetHooks

HandleNeeded

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


 CLX Reference

TWidgetStyle methods

TWidgetStyle	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetHooks

GetInterface

GetInterfaceEntry

GetInterfaceTable

HandleNeeded

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Refresh

SafeCallException


TWidgetStyle.Destroy
 CLX Reference

TWidgetStyle.Destroy

TWidgetStyle	See also

Frees a TWidgetStyle object.

destructor Destroy; override;

Description

Typically, applications do not free TWidgetStyle objects; they are freed by the object that uses them to implement its Style property. If you do need to free a TWidgetStyle object,, use the Free method, which checks that the object reference is not nil before calling Destroy.


Hierarchy

TObject

TStyle

TWidgetStyle


TWindowCascade
 CLX Reference

TWindowCascade

Hierarchy	Properties	Methods	Events	Using TWindowCascade	See also

TWindowCascade cascades the MDI child forms.

Unit

QStdActns

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.


 CLX Reference

TWindowCascade properties

TWindowCascade	Alphabetically	Legend

Derived from TWindowAction

Form

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TWindowCascade properties

TWindowCascade	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

Form

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TWindowCascade events

TWindowCascade	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TWindowCascade events

TWindowCascade	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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


TWindowClose
 CLX Reference

TWindowClose

Hierarchy	Properties	Methods	Events	Using TWindowClose	See also

TWindowClose closes the active MDI child form.

Unit

QStdActns

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.


 CLX Reference

TWindowClose properties

TWindowClose	Alphabetically	Legend

Derived from TWindowAction

Form

Derived from TCustomAction

Caption

Checked

DisableIfNoHandler

Enabled

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag


 CLX Reference

TWindowClose properties

TWindowClose	By object	Legend

ActionComponent

ActionList

Caption

Category

Checked

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

Form

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

ShortCut

Tag

Visible


 CLX Reference

TWindowClose events

TWindowClose	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 CLX Reference

TWindowClose events

TWindowClose	By object	Legend

OnExecute

OnHint

OnUpdate


 CLX 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

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


 CLX 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

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
 CLX 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
 CLX 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


Scope

Published

Protected

Accessibility

Read-only


Scope

Published

Protected

Accessibility

Read-only


Scope

Published

Protected

Accessibility

Read-only


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.


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.


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 image 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 windowhandles.

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  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(xfm 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 an  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.


Contnrs unit

Other objects and components, by unit

TClassList

TClassList maintains a list of classes.

TComponentList

TComponentList maintains a list of components, updating itself when a component is freed.

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.


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.


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.


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.

EUpdateError

EUpdateError is the exception class for dataset provider update errors.

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.


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.


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.


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.


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.


IniFiles unit

Other objects and components, by unit

ERegisterActionsException

ERegisterActionsException is the exception class for when the action registration system has not been initialized.

TCustomIniFile

TCustomIniFile is the abstract base class for components that encapsulate access to INI.

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.


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.


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.


Midas unit

Other objects and components, by unit

IAppServer

IAppServer is the interface that client datasets use to communicate with a dataset provider.


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.

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.


QActnList unit

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.

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.


QButtons 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.


QCheckLst unit

Other objects and components, by unit

TCheckListBox

TCheckListBox displays a scrollable list with check boxes next to each item.


QClipbrd unit

QClipbrd routines

Other objects and components, by unit

TClipboard

TClipboard represents the system clipboard.


QComCtrls unit

Other objects and components, by unit

ETreeViewError

ETreeViewError is the exception class for tree view errors.

TCustomHeaderControl

TCustomHeaderControl represents a spreadsheet-style header.

TCustomHeaderSection

Spreadsheet-style headers.

TCustomHeaderSections

TCustomHeaderSections is a container for THeaderSection objects.

TCustomIconView

TCustomIconView is the base class for controls that display simple icon items.

TCustomListView

TCustomListView is the base type for all list view components, including TListView.

TCustomSpinEdit

TCustomSpinEdit is the base class for spin boxes that enable users to choose a number.

TCustomTabControl

TCustomTabControl is the base type for tab-control components such as TTabControl and TPageControl.

TCustomTextBrowser

TCustomTextBrowser is the base class for rich text controls with hypertext features.

TCustomTextViewer

Base class for rich text controls.

TCustomTreeView

TCustomTreeView is the base type for tree-view components such as TTreeView.

TCustomViewControl

Base class for view controls.

TCustomViewItem

TCustomViewItem is an individual item of a TListView control.

TCustomViewItems

Item manager for TCustomViewControl.

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.

TIconOptions

TIconOptions describes how the icons in an icon view should be arranged.

TIconView

Basic implementation of an icon view.

TIconViewItem

TIconViewItem is an individual item an icon view.

TIconViewItems

TIconViewItems manages the item objects for an icon view control.

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 one or more columns.

TMimeSourceFactory

Repository for data type information.

TPageControl

TPageControl is a set of pages used to make a multiple page dialog box.

TProgressBar

TProgressBar displays a simple progress bar.

TSpinEdit

Spin boxes for choosing from a numeric range

TStatusBar

TStatusBar represents a status bar.

TStatusPanel

TStatusPanel represents a single panel of a status bar.

TStatusPanels

TStatusPanels is a container for TStatusPanel objects.

TTab

TTab represents a tab in a TCustomTabControl.

TTabControl

TTabControl is a tab set that has the appearance of notebook dividers.

TTabs

TTabs objects are containers for TTab objects.

TTabSheet

TTabSheet is an individual page in a TPageControl object.

TTextBrowser

Rich text control with hypertext features

TTextViewer

Basic rich text 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 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.


QControls unit

QControls routines

Other objects and components, by unit

ECanvasException

ECanvasException is the exception class for canvas objects.

EHeaderException

EHeaderException is the exception class for header controls.

EListColumnException

EListColumnException is the exception class for list columns.

EListViewException

EListViewException is the exception class for list views.

ERangeException

ERangeException is the exception class for range errors in graduated controls.

EStatusBarException

EStatusBarException is the exception class for status bar errors.

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 Qt widgets but perform their own rendering.

TDragControlObject

TDragControlObject object provides for normal drag and drop operations.

TDragObject

TDragObject is a base class used for managing drag operations.

TFrameControl

TFrameControl is the base class for all windowed controls that need a frame.

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.

TMouse

TMouse surfaces information about the mouse and specifies how the application responds to mouse messages.

TSizeConstraints

Contains size constraints for a control.

TWidgetControl

TWidgetControl is the base class for all controls that are wrappers for Qt widgets.

TWidgetControlActionLink

TWidgetControlActionLink is an action link used by descendents of TWidgetControl.


QDBActns 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.


QDBCtrls unit

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.

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.


QDBGrids 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.


QDialogs unit

QDialogs routines

Other objects and components, by unit

EQtDialogException

EQtDialogException is the exception class for Qt dialogs.

EWidgetControlException

EWidgetControlException is the exception class for controls that wrap Qt widgets.

TColorDialog

TColorDialog displays a modal color-selection dialog.

TCustomDialog

TCustomDialog is the ancestor of non-Qt dialog boxes.

TDialog

TDialog is the ancestor of all components that represent 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.

TQtDialog

TQtDialog is the ancestor of all Qt dialog boxes.

TReplaceDialog

TReplaceDialog displays a search-and-replace dialog.

TSaveDialog

TSaveDialog displays a "Save As" dialog for saving files.


QExtCtrls unit

QExtCtrls routines

Other objects and components, by unit

TBevel

TBevel represents a beveled outline.

TControlBar

TControlBar manages the layout of toolbar components.

TCustomControlBar

TCustomControlBar is the base class for control bar components.

TCustomPanel

TCustomPanel is the base class for all panel components.

TCustomRadioGroup

TCustomRadioGroup is the base class for radio-group components.

TImage

TImage displays a graphical image.

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 system timer functions.


QForms unit

QForms 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.

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.

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.

TScrollingWidget

TScrollingWidget is the base class for controls that support scrolling.


QGraphics unit

QGraphics 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.

EInvalidHandleException

EInvalidHandleException is the exception class for illegal operations involving handles with TFont, TPen, or TBrush objects.

TBitmap

TBitmap is an encapsulation of a matrix of pixels that defines an image.

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.

TDrawing

TDrawing represents a series of drawing commands that can be recorded and played back.

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 graphics object: TBrush, TFont, and TPen.

TIcon

TIcon is an encapsulation of a .ico file image.

TPalette

TPalette encapsulates the Qt Palette 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 graphic, or user-defined graphic.

TWidgetPalette

TWidgetPalette encapsulates the palette information for a control.


QGrids unit

Other objects and components, by unit

EInvalidGridOperation

EInvalidGridOperation is the exception class for illegal grid operations.

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.

TGridScrollBar

TGridScrollBar represents a scroll bar in a grid.

TInplaceEdit

TInPlaceEdit provides text editing capabilities for grid controls.

TItemEditor

TItemEditor provides edit item captions in views.

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.


QImgList 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.

TImageList

TImageList represents a collection of same-sized images, each of which can be referred to by its index.


QMask 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.


QMenus unit

QMenus 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.

TPopupMenu

TPopupMenu encapsulates the properties, methods, and events of a pop-up menu.


QPrinters unit

QPrinters routines

Other objects and components, by unit

EPrinter

EPrinter is the exception class for printing errors.

TPrinter

TPrinter encapsulates the QT printer interface. TPrinter acts in much the same ways as the previous versions. However, in the current version, printing is done via a PrintAdapter. By default, TPrinter creates a TQPrintAdapter which is a wrapper around the QT printer. Descendant classes should inherit from TPrintAdapter and implement the abstract methods.

TQPrintAdapter

TQPrintAdapter implements the QT printer routines. By default, TPrinter creates a TQPrintAdapter which is inherited from TPrintAdapter. Descendant classes should inherit from TPrintAdapter and implement the abstract methods.

TQPrintAdapter

TQPrintAdapter implements the QT printer routines. By default, TPrinter creates a TQPrintAdapter which is inherited from TPrintAdapter. Descendant classes should inherit from TPrintAdapter and implement the abstract methods.


QStdActns unit

Other objects and components, by unit

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 clipboard.

TEditCut

TEditCut cuts the selected text in a target edit control to the 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.

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.

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.

TWindowAction

TWindowAction is the base class for action objects that work with MDI forms.

TWindowCascade

TWindowCascade cascades the MDI child forms.

TWindowClose

TWindowClose closes the active MDI child form.

TWindowMinimizeAll

TWindowMinimizeAll minimizes all MDI child forms.

TWindowTile

TWindowTile arranges MDI child forms so that they are all the same size.


QStdCtrls unit

Other objects and components, by unit

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 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.

TCustomCheckBox

TCustomCheckBox is the ancestor of all check-box components.

TCustomComboBox

TCustomComboBox is the base class for combobox components.

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  controls that display text or bitmaps on a form.

TCustomLCDNumber

TCustomLCDNumber is the base class for all LCDNumber components.

TCustomListBox

TCustomListBox is the base class for listbox objects that are wrappers for list box widgets.

TCustomMemo

TCustomMemo is the base type for memo components, which are multiline edit boxes, including TMemo and TDBMemo.

TEdit

TEdit is a wrapper for a  single-line edit control.

TLabel

TLabel is a nonwindowed control that displays text or a bitmap on a form.

TLCDNumber

TLCDNumber represents a control that can display numeric information in a digit display format.

TListBox

TListBox is a wrapper for a Windows list box control.

TMemo

TMemo is a wrapper for a multiline edit control.

TRadioButton

TRadioButton is a wrapper for a system radio button.

TScrollBar

TScrollBar is a scroll bar, which is used to scroll the contents of a window, form, or control.


QStyle unit

Other objects and components, by unit

TApplicationStyle

Specifies a set of defaults for drawing the widgets in a CLX application.

TStyle

Specifies a set of defaults for drawing the widgets in a CLX application.

TWidgetStyle

Specifies how to paint a widget in a CLX application.


QTypes unit

QTypes routines

Other objects and components, by unit

EHandleComponentException

EHandleComponentException is the exception class for errors that occur when working with THandleComponent objects.

EInvalidParam

EInvalidParam is the exception class for illegal stream operations on mime sources.

TClxMimeSource

TClxMimeSource lets you read data from and write data to a QClxMimeSource object.

THandleComponent

THandleComponent is the base class for non-visual components that require a Handle.

TMimeSource

TMimeSource is a wrapper for a Qt QMimeSource object.


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.


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.

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 interface and can be used as a base for simple classes that benefit from having the IInterface methods implemented.

TObject

TObject is the ultimate ancestor of all CLX 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.

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 external error information.

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.

EQuit

EQuit is the exception class for SIGQUIT signals.

ERangeError

ERangeError is the exception class for integer values that are too large for the declared type to which they are assigned.

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.

Exception

Exception is the base class for all runtime exceptions.

EZeroDivide

EZeroDivide is the exception class for floating-point divide-by-zero errors.


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.


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.


WebBroker unit

WebBroker routines

Other objects and components, by unit

TWebApplication

TWebApplication encapsulates a Web server application.


WebReq unit

Other objects and components, by unit

TWebRequestHandler

TWebRequestHandler assigns request objects to web modules


Action support

Other routines, by category

Other routines, by unit

CreateAction function

EnumRegisteredActions procedure

RegisterActions procedure

UnRegisterActions procedure


Application-level information

Other routines, by category

Other routines, by unit

Application variable

Represents application-level information.

CmdShow variable

CmdShow always returns 0.

ExitProcessProc variable

ExitProcessProc specifies the last procedure to execute before the application shuts down.

HInstance variable

The handle for a module.

HintWindowClass variable

Specifies the class for the window used to display help hints.

InitProc variable

InitProc is the last installed initialization procedure.

IsLibrary variable

Indicates whether the module is a shared library.

JITEnable variable

Controls when the just-in-time debugger is called.

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.

Screen variable

Represents a screen device.


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.

MulDiv function

Peforms a specified integer multiplication followed by a specified integer division.

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.

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.


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

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.


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.


Cursor management routines

Other routines, by category

Other routines, by unit

CursorToIdent function

CursorToString function

GetCursorValues procedure

IdentToCursor function

InDragDropOperation function

Report drag operation status.

StringToCursor function


Database routines

Other routines, by category

Other routines, by unit

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.

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.

CompareDateTime function

Indicates the relationship between 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.

DateTimeToTimeStamp function

Converts a TDateTime value into the corresponding TTimeStamp value.

DateToStr function

Converts a TDateTime value to a string.

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.

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.

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.

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.

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.

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.

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.

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.

SameDateTime function

Indicates whether two TDateTime values represent the same year, month, day, hour, minute, second, and millisecond.

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.

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.

TryEncodeDateDay function

Calculates the TDateTime value that represents a specified day of the year for a specified 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.

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.


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.

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

InputBox function

Displays an input dialog box that lets the user enter a string, double, or integer.

InputQuery function

Displays an input dialog box that lets the user enter a string, double, or integer.

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.

RemoteLoginDialog function

Brings up the database Login dialog to allow the user to connect to a database server.

SelectDirectory function

Displays a dialog in which the user can select a directory name.

ShowMessage procedure

Displays a message box with an OK button.

ShowMessageFmt procedure

ShowMessagePos procedure


Drag and Drop utilities

Other routines, by category

Other routines, by unit

DragImageList function

Returns list of drag images


Drag operation support

Other routines, by category

Other routines, by unit

AddDragFormat function

Put formatted data in clipboard.

AdjustForClient procedure

Adjust client rectangle to represent client area.

AdjustForFrameprocedure

Convert client geometry between CLX and Qt conventions.

FindDragTarget function

Returns the control at a specified screen coordinate.

SaveDragDataToStream function

Retrieve drag payload.

SupportedDragFormats procedure

Return list of formats supported in current drag operation.


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.

ReleaseExceptionObject procedure

Decrements the reference count on an exception object that was incremented by a call to AcquireExceptionObject.

SetErrorProc function

ShowException procedure

Displays an exception message with its physical address

SysErrorMessage function

Converts OS error codes into strings.


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

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.

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.

FileSetDate function

Sets the OS time stamp for a specified file.

FileSetReadOnly function

Sets the file permissions to read-only.

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

GetCurrentDir function

Returns the name of the current directory.

GetDir procedure

Returns the current working directory.

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.

ExpandFileNameCase function

Returns the full path name for a case-insensitive relative file name.

ExpandUNCFileName

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.

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.


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

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.

Frame3D procedure

Draws a three dimensional frame on a canvas.

GetColorValues procedure

Passes the name of every predefined color constant to a callback function.

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.

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.


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.

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.


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 support routines

Other routines, by category

Other routines, by unit

CreateGUID function

Creates a globally unique identifier.

IsEqualGUID function

Indicates whether two TGUIDs are the same.


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

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.

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.

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.

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.


Memory management routines

Other routines, by category

Other routines, by unit

AllocMemCount variable

Represents the total number of allocated memory blocks in an application.

AllocMemSize variable

Represents the total size of allocated memory blocks.

GetMemoryManager procedure

Returns the entry points of the currently installed memory manager.

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 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 key code and shift state of a menu shortcut.

ShortCutToText function

StripHotKey function

TextToShortCut function

ValidMenuHotkeys variable

WideSameCaption function

Indicates whether two strings are the same based on the current Windows locale, ignoring case information and accelerator characters.


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 function

Generates a message beep.

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.

FormatMaskText function

Returns a string formatted using an edit mask.

FreeAndNilProperties function

Frees any property values that are objects and sets their value to nil.

GetEnvironmentVariable function

Returns environment variable value..

GetModuleFileName function

Returns the fully qualified name for a module, given its handle.

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

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

ButtonStateToShiftState function

Converts Qt button state value.

FindObject function

Returns the CLX object that represents a Qt widget.

GetCaptureControl function

Returns the control, if any, that currently receives all mouse messages.

GetCursorPos procedure

Return mouse cursor position.

GetMouseGrabControl 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.

SetMouseGrabControl procedure

Causes the specified control to receive all mouse messages.


Multi-tier support

Other routines, by category

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.


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.

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.


Program control

Other routines, by category

Other routines, by unit

Sleep procedure

Delay program execution for a specified number of microseconds.


Property category routines

Other routines, by category

Other routines, by unit

IsPropertyInCategory function

Indicates whether a property is in a specific property category.

RegisterPropertiesInCategory function

Registers multiple properties in a specific property category.

RegisterPropertyInCategory function

Registers a single property in a specific property category.


Qt / CLX conversion routines

Other routines, by category

Other routines, by unit

CopyQStringListToTStrings function

Copies the contents of a Qt QStringList to a TStrings object.

IODeviceFromStream function

Converts a TStream object to a Qt QIOStream object.

QStringListToTStringList function

Converts a Qt QStringList to a TStringList object.

TStringsToQStringList function

Converts of a TStrings object to a Qt QStringList object.


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.


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 resource.

ReadComponentResEx function

Reads a component from a resource.

ReadComponentResFile function

Reads components and their properties from a specified 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 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.

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

AdjustLineBreaks function

Adjust line break characters to Windows or Linux style.

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.

AnsiLowerCase function

Returns a string that is a copy of the given string converted 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.

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.

Delete procedure

Removes a substring from a string.

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.

Length function

Returns the number of characters in a string or elements in an array.

LowerCase function

Converts an ASCII string to lowercase.

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.

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.

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.

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.

InterlockedDecrement function

Thread-safe variable decrement.

InterlockedExchange function

Thread-safe variable exchange.

InterlockedExchangeAdd function

Thread-safe addition.

InterlockedIncrement function

Thread-safe variable increment.

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.

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.

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.

VarArrayRedim procedure

Resizes a 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.

VarClear procedure

Empties a Variant, so that it is unassigned.

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.

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.

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.


Widget utilities

Other routines, by category

Other routines, by unit

FindControl function

Returns the widget whose window is identified by the specifiedhandle or which appears at a specified position.


Windows controls utilities

Other routines, by category

Other routines, by unit

GetParentForm function

Returns the form that contains a specified control.


Classes routines

Classes objects/components

Other routines, by unit

ActivateClassGroup procedure

Activates a group of classes that derive from TPersistent.

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.

CurrentGroup variable

Keeps track of which objects are associated with which packages.

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 resource.

ReadComponentResEx function

Reads a component from a resource.

ReadComponentResFile function

Reads components and their properties from a specified 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.

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 resource file format.


DateUtils routines

Other routines, by unit

CompareDateTime function

Indicates the relationship between 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.

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.

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.

EncodeDateDay function

Returns a TDateTime value that represents a specified day of the year for a specified 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.

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.

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.

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.

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.

SameDateTime function

Indicates whether two TDateTime values represent the same year, month, day, hour, minute, second, and millisecond.

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.

TryEncodeDateDay function

Calculates the TDateTime value that represents a specified day of the year for a specified 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.

TryRecodeDateTime function

Selectively replaces parts of a specified 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.


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.


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.


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.


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.


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.


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.


MaskUtils routines

Other routines, by unit

FormatMaskText function

Returns a string formatted using an edit mask.


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.

IfThen function

Conditionally returns one of two specified values.

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.

RandomFrom function

Returns a randomly selected element from an array.

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.

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.


PropertyCategories routines

Other routines, by unit

IsPropertyInCategory function

Indicates whether a property is in a specific property category.


Provider routines

Provider objects/components

Other routines, by unit

VarArrayFromStrings function

Creates a Variant array that contains the strings in a TStrings object.


QClipbrd routines

QClipbrd 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.


QControls routines

QControls objects/components

Other routines, by unit

AddDragFormat function

Put formatted data in clipboard.

AdjustForClient procedure

Adjust client rectangle to represent client area.

AdjustForFrameprocedure

Convert client geometry between CLX and Qt conventions.

Beep function

Generates a message beep.

ButtonStateToShiftState function

Converts Qt button state value.

DragImageList function

Returns list of drag images

FindControl function

Returns the widget whose window is identified by the specifiedhandle or which appears at a specified position.

FindDragTarget function

Returns the control at a specified screen coordinate.

FindObject function

Returns the CLX object that represents a Qt widget.

GetCaptureControl function

Returns the control, if any, that currently receives all mouse messages.

GetCursorPos procedure

Return mouse cursor position.

GetLongHint function

Returns the second part of a two-part hint string.

GetMouseGrabControl function

Returns the control, if any, that currently receives all mouse messages.

GetShortHint function

Returns the first part of a two-part hint string.

InDragDropOperation function

Report drag operation status.

SaveDragDataToStream function

Retrieve drag payload.

SetCaptureControl procedure

Causes the specified control to receive all mouse messages.

SetMouseGrabControl procedure

Causes the specified control to receive all mouse messages.

SupportedDragFormats procedure

Return list of formats supported in current drag operation.


QDialogs routines

QDialogs objects/components

Other routines, by unit

InputBox function

Displays an input dialog box that lets the user enter a string, double, or integer.

InputQuery function

Displays an input dialog box that lets the user enter a string, double, or integer.

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.

SelectDirectory function

Displays a dialog in which the user can select a directory name.

ShowMessage procedure

Displays a message box with an OK button.


QExtCtrls routines

QExtCtrls objects/components

Other routines, by unit

Frame3D procedure

Draws a three dimensional frame on a canvas.


QForms routines

QForms objects/components

Other routines, by unit

Application variable

Represents application-level information.

GetParentForm function

Returns the form that contains a specified control.

HintWindowClass variable

Specifies the class for the window used to display help hints.

Mouse variable

Contains information about the system’s mouse.

Screen variable

Represents a screen device.

ValidParentForm function

Returns the form or property page that contains a specified control.


QGraphics routines

QGraphics objects/components

Other routines, by unit

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.

GetColorValues procedure

Passes the name of every predefined color constant to a callback function.

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.

IdentToColor function

Translates the name of a color constant to the corresponding TColor value.

MulDiv function

Peforms a specified integer multiplication followed by a specified integer division.

StringToColor function

Translates a string representation of a color to the corresponding TColor value.


QMenus routines

QMenus objects/components

Other routines, by unit

AnsiSameCaption function

Indicates whether two strings are the same based on the current 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 key code and shift state of a menu shortcut.

WideSameCaption function

Indicates whether two strings are the same based on the current Windows locale, ignoring case information and accelerator characters.


QPrinters routines

QPrinters 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.


QTypes routines

QTypes objects/components

Other routines, by unit

CopyQStringListToTStrings function

Copies the contents of a Qt QStringList to a TStrings object.

IODeviceFromStream function

Converts a TStream object to a Qt QIOStream object.

QStringListToTStringList function

Converts a Qt QStringList to a TStringList object.

TStringsToQStringList function

Converts of a TStrings object to a Qt QStringList object.


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.


SysInit routines

Other routines, by unit

HInstance variable

The handle for a module.


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 always returns 0.

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.

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 working directory.

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.

GetModuleFileName function

Returns the fully qualified name for a module, given its handle.

GetVariantManager procedure

Returns the entry points of the routines that define variant behavior.

Halt procedure

Initiates abnormal termination of a program.

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.

IsLibrary variable

Indicates whether the module is a shared library.

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.

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.

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.

AdjustLineBreaks function

Adjust line break characters to Windows or Linux style.

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.

CreateGUID function

Creates a globally unique identifier.

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.

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.

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.

ExpandFileNameCase function

Returns the full path name for a case-insensitive relative file name.

ExpandUNCFileName

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.

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.

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.

FileSetDate function

Sets the OS time stamp for a specified file.

FileSetReadOnly function

Sets the file permissions to read-only.

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.

InterlockedDecrement function

Thread-safe variable decrement.

InterlockedExchange function

Thread-safe variable exchange.

InterlockedExchangeAdd function

Thread-safe addition.

InterlockedIncrement function

Thread-safe variable increment.

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.

IsEqualGUID function

Indicates whether two TGUIDs are the same.

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.

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.

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.

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

Sleep procedure

Delay program execution for a specified number of microseconds.

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.

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.

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.


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.

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.

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.

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.

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.

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.


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.