PrinterSettings.PaperSources Proprietà

Definizione

Ottiene i cassetti di alimentazione disponibili nella stampante.

public:
 property System::Drawing::Printing::PrinterSettings::PaperSourceCollection ^ PaperSources { System::Drawing::Printing::PrinterSettings::PaperSourceCollection ^ get(); };
public System.Drawing.Printing.PrinterSettings.PaperSourceCollection PaperSources { get; }
member this.PaperSources : System.Drawing.Printing.PrinterSettings.PaperSourceCollection
Public ReadOnly Property PaperSources As PrinterSettings.PaperSourceCollection

Valore della proprietà

PrinterSettings.PaperSourceCollection

Oggetto PrinterSettings.PaperSourceCollection che rappresenta i cassetti di alimentazione disponibili in questa stampante.

Esempio

L'esempio di codice seguente popola la comboPaperSource casella combinata con le origini di carta supportate dalla stampante. L'oggetto SourceName viene identificato come proprietà che fornisce la stringa di visualizzazione per l'elemento da aggiungere tramite la DisplayMember proprietà della casella combinata. L'esempio richiede che esista una PrintDocument variabile denominata printDoc e che esista la casella combinata specifica.

// Add list of paper sources found on the printer to the combo box.
// The DisplayMember property is used to identify the property that will provide the display String*.
comboPaperSource->DisplayMember = "SourceName";
PaperSource^ pkSource;
for ( int i = 0; i < printDoc->PrinterSettings->PaperSources->Count; i++ )
{
   pkSource = printDoc->PrinterSettings->PaperSources[ i ];
   comboPaperSource->Items->Add( pkSource );
}
// Add list of paper sources found on the printer to the combo box.
// The DisplayMember property is used to identify the property that will provide the display string.
comboPaperSource.DisplayMember="SourceName";

PaperSource pkSource;
for (int i = 0; i < printDoc.PrinterSettings.PaperSources.Count; i++){
    pkSource = printDoc.PrinterSettings.PaperSources[i];
    comboPaperSource.Items.Add(pkSource);
}
' Add list of paper sources found on the printer to the combo box.
' The DisplayMember property is used to identify the property that will provide the display string.
comboPaperSource.DisplayMember = "SourceName"

Dim pkSource As PaperSource
For i = 0 to printDoc.PrinterSettings.PaperSources.Count - 1
    pkSource = printDoc.PrinterSettings.PaperSources.Item(i)
    comboPaperSource.Items.Add(pkSource)
Next

Commenti

Contiene PrinterSettings.PaperSourceCollection PaperSource istanze che rappresentano i vassoi di origine carta tramite la PaperSource.Kind proprietà , che contiene uno dei PaperSourceKind valori .

In genere, si imposta l'origine carta di una pagina tramite la PageSettings.PaperSource proprietà su una valida disponibile PaperSource tramite la PaperSources raccolta.

Si applica a

Vedi anche