event Refresh ()
Notifies your application when the pages are refreshed.

 TypeDescription 
The Refresh event occurs once the pages are updated for previewing or printing. Use the Refresh event to update the buttons in the toolbar while previewing. The ToolBarFormat property specifies the CRD format to display buttons, pictures and your HTML captions in the eXPrint's toolbar. The ItemCaption property specifies the caption of the buttons inside the toolbar. The ItemToolTip property specifies the tool tip for buttons inside the toolbar. The Settings property specifies different printer settings. The Refresh method forces refreshing the print and print preview pages. The Refreshing event notifies your application once the pages are about to be updated for previewing or printing.

Syntax for Refresh event, /NET version, on:

private void Refresh(object sender)
{
}

Private Sub Refresh(ByVal sender As System.Object) Handles Refresh
End Sub

Syntax for Refresh event, /COM version, on:

private void Refresh(object sender, EventArgs e)
{
}

void OnRefresh()
{
}

void __fastcall Refresh(TObject *Sender)
{
}

procedure Refresh(ASender: TObject; );
begin
end;

procedure Refresh(sender: System.Object; e: System.EventArgs);
begin
end;

begin event Refresh()
end event Refresh

Private Sub Refresh(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Refresh
End Sub

Private Sub Refresh()
End Sub

Private Sub Refresh()
End Sub

LPARAMETERS nop

PROCEDURE OnRefresh(oPrint)
RETURN

Syntax for Refresh event, /COM version (others), on:

<SCRIPT EVENT="Refresh()" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Refresh()
End Function
</SCRIPT>

Procedure OnComRefresh 
	Forward Send OnComRefresh 
End_Procedure

METHOD OCX_Refresh() CLASS MainDialog
RETURN NIL

void onEvent_Refresh()
{
}

function Refresh as v ()
end function

function nativeObject_Refresh()
return

The following VB sample adds a button to the right side of the toolbar, and shows the current printer name:

With Print1
    .ToolBarFormat = .ToolBarFormat & ",|,-201:128"
End With
Private Sub Print1_Refresh()
    With Print1
        .ItemCaption(-201) = "<fgcolor=808080>" & .Settings(exPrinterName) & "</fgcolor>"
    End With
End Sub

The following VB/NET sample adds a button to the right side of the toolbar, and shows the current printer name:

With Exprint1
    .ToolBarFormat = .ToolBarFormat & ",|,-201:128"
End With

Private Sub Exprint1_RefreshEvent(ByVal sender As System.Object) Handles Exprint1.RefreshEvent
    With Exprint1
        .set_ItemCaption(-201, "<fgcolor=808080>" & .get_Settings(exontrol.EXPRINTLib.FieldsEnum.exPrinterName) & "</fgcolor>")
    End With
End Sub

Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.