PrinterSettings.PaperSources 속성

정의

프린터에서 사용할 수 있는 용지 공급함을 가져옵니다.

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

속성 값

PrinterSettings.PaperSourceCollection

이 프린터에서 사용할 수 있는 용지 공급함을 나타내는 PrinterSettings.PaperSourceCollection입니다.

예제

다음 코드 예제에서는 프린터의 지원되는 용지 원본으로 콤보 상자를 채웁 comboPaperSource 니다. SourceName 콤보 상자의 속성을 통해 추가되는 항목에 대한 표시 문자열을 DisplayMember 제공하는 속성으로 식별됩니다. 이 예제에서는 명명 printDocPrintDocument 변수가 존재하고 특정 콤보 상자가 있어야 합니다.

// 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

설명

PrinterSettings.PaperSourceCollection 중 하나를 포함하는 속성을 통해 용지 원본 트레이를 PaperSource.Kind 나타내는 인스턴스가 PaperSourceKind 포함 PaperSource 됩니다.

일반적으로 속성을 통해 페이지의 용지 원본을 PageSettings.PaperSource 컬렉션을 통해 PaperSources 사용할 수 있는 유효한 PaperSource 것으로 설정합니다.

적용 대상

추가 정보