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

Description

WindowState determines the state in which the Preview Window will appear. This property is only applicable when Output is set to go toWindow.

WindowState is now an active property; setting it while the Crystal Preview Window is open will cause it to change the WindowState of the open window.

When the Crystal Preview Window is open, it is also possible to update the WindowState setting by calling RetrieveWindowState.

WindowState Example

Sets the Preview Window state to minimized:

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

Crpe1.Output := toWindow;

Crpe1.WindowState := wsMinimized;

Crpe1.Execute;

WindowStyle

Declaration

property WindowStyle: TCrpeWindowStyle;

Type

TCrpeWindowStyle = class(TPersistent)

Description

The WindowStyle property contains the properties which determine the Style of the Crystal Preview Window:

BorderStyle

Window Border Style: sizeable, dialog, etc.

 

 

Disabled

Determines if the Window is enabled or disabled.

 

 

SystemMenu

The Windows menu that appears in the upper left corner of a Window.

MaxButton

The Maximize button.

 

 

MinButton

The Minimize button.

 

 

Title

The Window Caption.

 

 

VCL Reference

128

Depending on what BorderStyle is chosen, certain of the other options may or may not appear:

BorderStyle

SystemMenu

MaxButton

MinButton

Title

 

 

 

 

 

 

 

 

 

 

bsNone

n/a

n/a

n/a

n/a

bsSingle

Possible

Possible

Possible

Possible

 

 

 

 

 

bsSizeable

Possible

Possible

Possible

Possible

 

 

 

 

 

bsDialog

Possible

n/a

n/a

Possible

 

 

 

 

 

WindowStyle Example

This code sample shows how to set the WindowStyle options:

Crpe1.ReportName := 'MyReport.rpt'; Crpe1.Output := toWindow;

{Set the WindowStyle options} with Crpe1.WindowStyle do begin

BorderStyle := Sizeable; SystemMenu := True; MaxButton := True; MinButton := True;

Title := 'MyReport'; end;

Crpe1.Execute;

WindowStyle Properties

WindowStyle BorderStyle property, Page 707

WindowStyle Disabled property, Page 707

WindowStyle MaxButton property, Page 708

WindowStyle MinButton property, Page 708

WindowStyle SystemMenu property, Page 709

WindowStyle Title property, Page 710

WindowStyle Methods

WindowStyle Clear method, Page 710

WindowStyle CopyFrom method, Page 711

WindowStyle Create method, Page 712

VCL Reference

129

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