PrinterSettings.PaperSources 속성

정의

프린터에서 사용할 수 있는 용지 공급함을 가져옵니다.Gets the paper source trays that are available on the printer.

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입니다.A PrinterSettings.PaperSourceCollection that represents the paper source trays that are available on this printer.

예제

다음 코드 예제에서는 comboPaperSource 콤보 상자를 프린터의 지원 되는 용지 소스로 채웁니다.The following code example populates the comboPaperSource combo box with the printer's supported paper sources. SourceName은 콤보 상자의 DisplayMember 속성을 통해 추가 되는 항목에 대 한 표시 문자열을 제공 하는 속성으로 식별 됩니다.The SourceName is identified as the property that provides the display string for the item being added through the DisplayMember property of the combo box. 이 예에서는 printDoc 이라는 PrintDocument 변수가 있고 특정 콤보 상자가 있어야 합니다.The example requires that a PrintDocument variable named printDoc exists and that the specific combo box exists.

// 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.PaperSourceCollectionPaperSourceKind 값 중 하나를 포함 하는 PaperSource.Kind 속성을 통해 용지 공급 트레이를 나타내는 PaperSource 인스턴스를 포함 합니다.The PrinterSettings.PaperSourceCollection contains PaperSource instances that represent the paper source trays through the PaperSource.Kind property, which contains one of the PaperSourceKind values.

일반적으로 PageSettings.PaperSource 속성을 통해 페이지의 용지 원본을 PaperSources 컬렉션을 통해 사용할 수 있는 유효한 PaperSource로 설정 합니다.Typically, you set a page's paper source through the PageSettings.PaperSource property to a valid PaperSource available through the PaperSources collection.

적용 대상

추가 정보