

| Type | Description | |||
| ID as Long | A long expression that specifies the identifier of the button being clicked. | |||
| SelectedID as Long | A long expression that specifies the identifier being selected. ( the identifier being specified by the second part of the ItemCaption property [separated by # character ] ). For instance, if the ItemCaption property is "Letter#1234" the button displays the "Letter" label, the SelectedID paremeter is 1234 if the user clicks the button or selects the item in a drop down field. |
private void Click(object sender,int ID,int SelectedID)
{
}
Private Sub Click(ByVal sender As System.Object,ByVal ID As Integer,ByVal SelectedID As Integer) Handles Click End Sub |
private void ClickEvent(object sender, AxEXPRINTLib._IExPrintEvents_ClickEvent e)
{
}
void OnClick(long ID,long SelectedID)
{
}
void __fastcall Click(TObject *Sender,long ID,long SelectedID)
{
}
procedure Click(ASender: TObject; ID : Integer;SelectedID : Integer); begin end; procedure ClickEvent(sender: System.Object; e: AxEXPRINTLib._IExPrintEvents_ClickEvent); begin end; begin event Click(long ID,long SelectedID) end event Click Private Sub ClickEvent(ByVal sender As System.Object, ByVal e As AxEXPRINTLib._IExPrintEvents_ClickEvent) Handles ClickEvent End Sub Private Sub Click(ID As Long,SelectedID As Long) End Sub Private Sub Click(ByVal ID As Long,ByVal SelectedID As Long) End Sub LPARAMETERS ID,SelectedID PROCEDURE OnClick(oPrint,ID,SelectedID) RETURN |
<SCRIPT EVENT="Click(ID,SelectedID)" LANGUAGE="JScript"> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> Function Click(ID,SelectedID) End Function </SCRIPT> Procedure OnComClick Integer llID Integer llSelectedID Forward Send OnComClick llID llSelectedID End_Procedure METHOD OCX_Click(ID,SelectedID) CLASS MainDialog RETURN NIL void onEvent_Click(int _ID,int _SelectedID)
{
}
function Click as v (ID as N,SelectedID as N) end function function nativeObject_Click(ID,SelectedID) return |
The following VB sample adds three buttons to the right side of the toolbar to display and edit the paper size, the paper orientation, and to display the current printer ( as shown in the following screen shot ):

With Print1
.ToolBarFormat = .ToolBarFormat & ",|,(201,200,-201):224"
End WithPrivate Sub Print1_Click(ID As Long, SelectedID As Long)
With Print1
If (ID = 200) Then
.PageOrientation = SelectedID
.Refresh
End If
If (ID = 201) Then
.Settings(exPaperSize) = SelectedID
.Refresh
End If
End With
End Sub
Private Sub Print1_Refresh()
With Print1
.ItemCaption(-201) = "<fgcolor=808080>" & .Settings(exPrinterName) & "</fgcolor>"
.ItemToolTip(-201) = .Settings(exPrinterName)
.ItemCaption(200) = IIf(.PageOrientation = exLandscape, "Landscape#1", "Portrait#2")
.ItemToolTip(200) = "Page Orientation"
.ItemCaption(201) = .Settings(exFormName) & vbCrLf & "Letter#1" & vbCrLf & "A4#9" & vbCrLf & "A5#11" & vbCrLf & "A6#70"
.ItemToolTip(201) = "Paper Size"
End With
End SubThe following VB/NET sample adds three buttons to the right side of the toolbar to display and edit the paper size, the paper orientation, and to display the current printer ( as shown in the following screen shot ):
With Exprint1
.ToolBarFormat = .ToolBarFormat & ",|,(201,200,-201):224"
End WithPrivate Sub Exprint1_Click(ByVal sender As System.Object, ByVal ID As System.Int32, ByVal SelectedID As System.Int32) Handles Exprint1.Click
With Exprint1
If (ID = 200) Then
.PageOrientation = SelectedID
.Refresh()
End If
If (ID = 201) Then
.set_Settings(exontrol.EXPRINTLib.FieldsEnum.exPaperSize, SelectedID)
.Refresh()
End If
End With
End Sub
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>")
.set_ItemToolTip(-201, .get_Settings(exontrol.EXPRINTLib.FieldsEnum.exPrinterName))
.set_ItemCaption(200, IIf(.PageOrientation = exontrol.EXPRINTLib.PageOrientationEnum.exLandscape, "Landscape#1", "Portrait#2"))
.set_ItemToolTip(200, "Page Orientation")
.set_ItemCaption(201, .get_Settings(exontrol.EXPRINTLib.FieldsEnum.exFormName) & vbCrLf & "Letter#1" & vbCrLf & "A4#9" & vbCrLf & "A5#11" & vbCrLf & "A6#70")
.set_ItemToolTip(201, "Paper Size")
End With
End Sub