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

Add(' - GroupLevel: ' + IntToStr(NGroupLevel)); Add(' - GroupList: ');

for cnt := 0 to (GroupList.Count - 1) do

Add('

' + IntToStr(cnt) + '. ' + GroupList[cnt]);

Add('');

 

end;

 

end;

 

wOnExportBtnClick

wOnExportBtnClick takes place after the Export button on the Preview Window button bar is clicked, but before the Export process starts. This event passes the following variables:

WindowHandle - The Handle to the current Preview Window.

Cancel - A variable that can be set to True to cancel the normal Preview Window response to the Event.

Declaration

property wOnExportBtnClick: TCrpeGeneralPrintWindowEvent;

Type

TCrpeGeneralPrintWindowEvent = procedure(WindowHandle: HWnd; var Cancel: Boolean) of object;

Remarks

You must be using Crystal 6.0 or higher to use Window Events.

Example

The following procedure illustrates the wOnExportBtnClick Event:

procedure TForm1.Crpe1wOnExportBtnClick(WindowHandle: Integer; var Cancel: Boolean);

begin

with Memo1.Lines do begin

Add('wOnExportBtnClick Event:'); Add(' - Export Button clicked ');

Add(' - WindowHandle: ' + IntToStr(WindowHandle)); Add('');

end; end;

VCL Reference

184

wOnFirstPageBtnClick

wOnFirstPageBtnClick takes place after the FirstPage button on the Preview Window button bar is clicked, but before the Report goes to the first page. This event passes the following variables:

WindowHandle

The Handle to the current Preview Window.

Cancel

A variable that can be set to True to cancel the normal Preview Window

 

response to the Event.

 

 

Declaration

property wOnFirstPageBtnClick: TCrpeGeneralPrintWindowEvent;

Type

TCrpeGeneralPrintWindowEvent = procedure(WindowHandle: HWnd; var Cancel: Boolean) of object;

Remarks

You must be using Crystal 6.0 or higher to use Window Events.

Example

The following procedure illustrates the wOnFirstPageBtnClick Event:

procedure TForm1.Crpe1wOnFirstPageBtnClick(WindowHandle: Integer; var Cancel: Boolean);

begin

with Memo1.Lines do begin

Add('wOnFirstPageBtnClick Event:'); Add(' - First Page Button clicked ');

Add(' - WindowHandle: ' + IntToStr(WindowHandle)); Add('');

end; end;

wOnGroupTreeBtnClick

wOnGroupTreeBtnClick takes place after the GroupTree button on the Preview Window button bar is clicked, but before showing or hiding the GroupTree. This event passes the following variables:

WindowHandle

The Handle to the current Preview Window.

 

 

Cancel

A variable that can be set to True to cancel the normal Preview Window

 

response to the Event.

VCL Reference

185

Declaration

property wOnGroupTreeBtnClick: TCrpeGeneralPrintWindowEvent;

Type

TCrpeGeneralPrintWindowEvent = procedure(WindowHandle: HWnd; var Cancel: Boolean) of object;

Remarks

You must be using Crystal 6.0 or higher to use Window Events.

Example

The following procedure illustrates the wOnGroupTreeBtnClick Event:

procedure TForm1.Crpe1wOnGroupTreeBtnClick(WindowHandle: Integer; Visible: Boolean; var Cancel: Boolean);

begin

with Memo1.Lines do begin

Add('wOnGroupTreeBtnClick Event:'); Add(' - GroupTree Button clicked ');

Add(' - WindowHandle: ' + IntToStr(WindowHandle)); Add(' - GroupTree Visible: ' + BooleanToStr(Visible)); Add('');

end; end;

wOnLastPageBtnClick

wOnLastPageBtnClick takes place after the LastPage button on the Preview Window button bar is clicked, but before going to the last page. This event passes the following variables:

WindowHandle

The Handle to the current Preview Window.

 

 

Cancel

A variable that can be set to True to cancel the normal Preview Window

 

response to the Event.

 

 

Declaration

property wOnLastPageBtnClick: TCrpeGeneralPrintWindowEvent;

Type

TCrpeGeneralPrintWindowEvent = procedure(WindowHandle: HWnd; var Cancel: Boolean) of object;

VCL Reference

186

Remarks

You must be using Crystal 6.0 or higher to use Window Events.

Example

The following procedure illustrates the wOnLastPageBtnClick Event:

procedure TForm1.Crpe1wOnLastPageBtnClick(WindowHandle: Integer; var Cancel: Boolean);

begin

with Memo1.Lines do begin

Add('wOnLastPageBtnClick Event:'); Add(' - Last Page Button clicked ');

Add(' - WindowHandle: ' + IntToStr(WindowHandle)); Add('');

end; end;

wOnNextPageBtnClick

wOnNextPageBtnClick takes place after the NextPage button on the Preview Window button bar is clicked, but before going to the next page. This event passes the following variables:

WindowHandle

The Handle to the current Preview Window.

 

 

Cancel

A variable that can be set to True to cancel the normal Preview Window

 

response to the Event.

 

 

Declaration

property wOnNextPageBtnClick: TCrpeGeneralPrintWindowEvent;

Type

TCrpeGeneralPrintWindowEvent = procedure(WindowHandle: HWnd; var Cancel: Boolean) of object;

Remarks

You must be using Crystal 6.0 or higher to use Window Events.

VCL Reference

187

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