Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
115
Добавлен:
20.03.2015
Размер:
4.73 Mб
Скачать

Example

The example below sets the Mouse Cursor to a Magnifying Glass when it passes over a Detail Area Field on the Preview Window:

Crpe1.ReportName := 'C:\Company.rpt;

Crpe1.WindowCursor.DetailAreaField := wcMagnify;

Crpe1.Output := toWindow;

Crpe1.Execute;

WindowCursor GroupArea property

Declaration

property GroupArea: TCrWindowCursor;

Type

TCrWindowCursor = (wcDefault, wcArrow, wcCross, wcIBeam, wcUpArrow, wcSizeAll, wcSizeNWSE, wcSizeNESW, wcSizeWE, wcSizeNS, wcNo, wcWait, wcAppStart, wcHelp, wcMagnify);

Description

The GroupArea property controls what Mouse Cursor shape will appear when the Mouse is passing over a Group section on the runtime Preview Window.

Example

The example below sets the Mouse Cursor to a Magnifying Glass when it passes over a Group Area on the Preview Window:

Crpe1.ReportName := 'C:\Company.rpt;

Crpe1.WindowCursor.GroupArea := wcMagnify;

Crpe1.Output := toWindow;

Crpe1.Execute;

WindowCursor GroupAreaField property

Declaration

property GroupAreaField: TCrWindowCursor;

VCL Reference

698

Type

TCrWindowCursor = (wcDefault, wcArrow, wcCross, wcIBeam, wcUpArrow, wcSizeAll, wcSizeNWSE, wcSizeNESW, wcSizeWE, wcSizeNS, wcNo, wcWait, wcAppStart, wcHelp, wcMagnify);

Description

The GroupAreaField property controls what Mouse Cursor shape will appear when the Mouse is passing over a Field in a Group section on the runtime Preview Window.

Example

The example below sets the Mouse Cursor to a Magnifying Glass when it passes over a Group Area Field on the Preview Window:

rpe1.ReportName := 'C:\Company.rpt; Crpe1.WindowCursor.GroupAreaField := wcMagnify; Crpe1.Output := toWindow;

Crpe1.Execute;

WindowCursor Methods

WindowCursor Clear method

Declaration

procedure Clear;

Description

This method can be used to set all of the WindowCursor properties back to default:

GroupArea

:= wcDefault;

GroupAreaField

:= wcDefault;

DetailArea

:= wcDefault;

DetailAreaField :=

wcDefault;

Graph

:=

wcDefault;

Example

This code clears the WindowCursor properties:

Crpe1.WindowCursor.Clear;

VCL Reference

699

WindowCursor CopyFrom method

Declaration

function CopyFrom(Source: TCrpeWindowCursor): boolean;

Description

The CopyFrom method copies the WindowCursor property values from another TCrpeWindowCursor object. It is similar to Delphi's Assign method. It is useful for transferring or temporary storage of values.

Example

The following example copies all the WindowCursor property values to a temporary TCrpeWindowCursor object:

var

tempWindowCursor : TCrpeWindowCursor; begin

tempWindowCursor := TCrpeWindowCursor.Create; tempWindowCursor.CopyFrom(Crpe1.WindowCursor); {...later, when finished with the temp object...} tempWindowCursor.Free;

end;

WindowCursor Create method

Declaration

constructor Create;

Description

The Create constructor creates the WindowCursor object. It is used internally in the VCL component to create the WindowCursor object and should not be called outside of the component.

WindowCursor Retrieve method

Declaration

function Retrieve: boolean;

VCL Reference

700

Description

The Retrieve method obtains the WindowCursor information from the Report and stores it in the WindowCursor object. If WindowCursor information was not found, the call returns False.

Example

This code sample retrieves the WindowCursor settings from a Report. Unless the Report has already been run with specific WindowCursor settings (or if it has Saved Data), the retrieved values will be default:

Crpe1.ReportName := 'Company.rpt';

Crpe1.WindowCursor.Retrieve;

WindowCursor Send method

Declaration

function Send: boolean;

Description

The Send method sends the WindowCursor values to the Crystal Reports Print Engine. This method is called automatically when the Execute method is called, provided that SendOnExecute is set to True.

It is strongly recommended that you leave SendOnExecute to True, and let the Crystal Reports component send the values to the Print Engine. If you set the SendOnExecute property to False, each Sub-class and each property that does not belong to a Sub-class must be manually sent before calling the Execute method. This feature is mainly provided for debugging purposes.

Example

In this example, the WindowCursor settings are sent from the Crystal component to the Crystal Reports Print Engine DLL. This is normally handled automatically in the Execute method:

Crpe1.WindowCursor.Send;

WindowSize Properties

WindowSize Height property

Declaration

property Height: smallint;

VCL Reference

701

Соседние файлы в папке Crystal