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

ExportBtn := True;

GroupTree := False;

NavigationCtls := True;

PrintBtn := True;

PrintSetupBtn := False;

ProgressCtls := True;

RefreshBtn := False;

SearchBtn := False;

ZoomCtl := True;

These settings are exactly the same as the Crystal Reports 5.0 preview window, which did not have the extra Preview Window buttons that were added in Crystal Reports 6.0, nor did it have the ability to show/hide the various buttons.

It is called automatically if the Clear method is called for the main component, but may be called in code as needed.

Example

This line of code clears the WindowButtonBar properties:

Crpe1.WindowButtonBar.Clear;

WindowButtonBar CopyFrom method

Declaration

function CopyFrom(Source: TCrpeWindowButtonBar): boolean;

Description

The CopyFrom method copies the WindowButtonBar property values from another TCrpeWindowButtonBar 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 WindowButtonBar property values to a temporary TCrpeWindowButtonBar object:

var

tempWindowButtonBar : TCrpeWindowButtonBar; begin

tempWindowButtonBar := TCrpeWindowButtonBar.Create; tempWindowButtonBar.CopyFrom(Crpe1.WindowButtonBar); {...later, when finished with the temp object...} tempWindowButtonBar.Free;

end;

VCL Reference

694

WindowButtonBar Create method

Declaration

constructor Create;

Description

The Create method is used internally in the Crystal component to create the WindowButtonBar object, and does not need to be called in code.

WindowButtonBar Retrieve method

Declaration

function Retrieve: boolean;

Description

The Retrieve method can be used to obtain the current WindowButtonBar settings from an open Crystal Preview Window. If there is no open window, the Retrieve method returns False.

Example

The following code sample runs a Report to Preview Window, then retrieves the WindowButtonBar settings:

Crpe1.ReportName := 'MyReport.rpt';

Crpe1.Output := toWindow;

Crpe1.Execute;

Crpe1.WindowButtonBar.Retrieve;

WindowButtonBar Send method

Declaration

function Send: boolean;

Description

The Send method sends the WindowButtonBar 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.

VCL Reference

695

We strongly recommend 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 WindowButtonBar settings are sent from the Crystal component to the Crystal Reports Print Engine DLL. This is normally handled automatically in the Execute method:

Crpe1.WindowButtonBar.Send;

WindowCursor Properties

WindowCursor DetailArea property

Declaration

property DetailArea: TCrWindowCursor;

Type

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

Description

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

Example

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

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

Crpe1.WindowCursor.DetailArea := wcMagnify;

Crpe1.Output := toWindow;

Crpe1.Execute;

VCL Reference

696

WindowCursor DetailAreaField property

Declaration

property DetailAreaField: TCrWindowCursor;

Type

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

Description

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

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 Graph property

Declaration

property Graph: TCrWindowCursor;

Type

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

Description

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

VCL Reference

697

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