combit List & Label 25 - .NET Online Web Help
DefinePrintOptions Event


combit.ListLabel25 Namespace > ListLabel Class : DefinePrintOptions Event

This event can be used to set additional options to be used for print/export.

Internally, the event is triggered after the print/export process is started; but before the actual printing starts. This allows you to define various export options using the ExportOptions property or set special print options using LlPrintSetOption and LlPrintOption.

Syntax
'Declaration
 
Public Event DefinePrintOptions As DefinePrintOptionsHandler
public event DefinePrintOptionsHandler DefinePrintOptions
public:
event DefinePrintOptionsHandler^ DefinePrintOptions
Example

If the number of copies is to be defined for label printing, this can be done with LlPrintOption.Copies.

...
// Define label as project type
LL.AutoProjectType = LlProject.Label;

// Register event for defining additional print options
LL.DefinePrintOptions += LL_DefinePrintOptions;

// Print
LL.Print();
...

private static void LL_DefinePrintOptions(object sender, EventArgs e)
{
    // Get the calling List & Label object
    ListLabel senderLL = sender as ListLabel;

    // Define amount of hardware copies
    senderLL.Core.LlPrintSetOption(LlPrintOption.Copies, 2 /* amount of copies */);
}
                
...
' Define label as project type
LL.AutoProjectType = LlProject.Label

'Register event for defining additional print options
AddHandler LL.DefinePrintOptions, AddressOf LL_DefinePrintOptions

' Print
LL.Print()

...

Sub LL_DefinePrintOptions(sender As Object, e As EventArgs) Handles LL.DefinePrintOptions

    ' Get the calling List & Label object
    Dim senderLL As ListLabel = TryCast(sender, ListLabel)
   
    ' Define amount of hardware copies
    senderLL.Core.LlPrintSetOption(LlPrintOption.Copies, 2)

End Sub

 

Requirements

Platforms: Windows 7 SP1 - Windows 10 Version 1909, Windows Server 2008 R2 - 2019

See Also

Reference

ListLabel Class
ListLabel Members