Xceed Chart for WinForms v4.4 Documentation
EnumeratePaperSizes Method
Example 


Xceed.Chart.v4.4 Assembly > Xceed.Chart Namespace > PrintManager Class : EnumeratePaperSizes Method
Enumerates the paper sizes supported by the specified printer.
Syntax
'Declaration
 
Public Function EnumeratePaperSizes( _

   ByVal printerIndex As Integer, _

   ByVal paperSizes As ArrayList _

) As PaperSize
'Usage
 
Dim instance As PrintManager

Dim printerIndex As Integer

Dim paperSizes As ArrayList

Dim value As PaperSize

 

value = instance.EnumeratePaperSizes(printerIndex, paperSizes)
public PaperSize EnumeratePaperSizes( 

   int printerIndex,

   ArrayList paperSizes

)

Parameters

printerIndex
paperSizes
Example
The following code fills a combo box with the paper size for the selected printer index:
ArrayList arrComboItems = new ArrayList();

PaperSize paperSize = ChartControl.PrintManager.EnumeratePaperSizes(currentPrinter, arrComboItems);

 for (int i = 0; i < arrComboItems.Count; i++)

 {

   if ((String)arrComboItems[i] == paperSize.PaperName)

    selectedIndex = i;

    

  PaperSizeComboBox.Items.Add((String)arrComboItems[i]);

}

if (selectedIndex != -1)

   PaperSizeComboBox.SelectedIndex = selectedIndex;
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

PrintManager Class
PrintManager Members