次の方法で共有


WorkflowView.HScrollBar プロパティ

定義

WorkflowView の水平スクロール バーを取得します。

public:
 property System::Windows::Forms::HScrollBar ^ HScrollBar { System::Windows::Forms::HScrollBar ^ get(); };
public System.Windows.Forms.HScrollBar HScrollBar { get; }
member this.HScrollBar : System.Windows.Forms.HScrollBar
Public ReadOnly Property HScrollBar As HScrollBar

プロパティ値

水平スクロール バーの設定と表示の調整に使用できる ScrollBar

WorkflowView クラスのインスタンスを取得する方法を次のコード例に示します。 その後、このコードは WorkflowViewHScrollBar などのいくつかの VScrollBar プロパティを設定し、FitToWorkflowSize メソッドを呼び出します。

public void DisplayFullWorkflowView()
{
    IDesignerHost designerHost = designSurface.GetService(typeof(IDesignerHost)) as IDesignerHost;
    if (designerHost != null && designerHost.RootComponent != null)
    {
        WorkflowView workflowView = designerHost.RootComponent.Site.GetService(typeof(WorkflowView)) as WorkflowView;
        if (workflowView != null)
        {
            workflowView.Dock = DockStyle.Fill;
            workflowView.TabIndex = 1;
            workflowView.TabStop = true;
            workflowView.HScrollBar.TabStop = false;
            workflowView.VScrollBar.TabStop = false;
            workflowView.Focus();
            workflowView.FitToWorkflowSize();
        }
    }
}
Public Sub DisplayFullWorkflowView()
    Dim designerHost As IDesignerHost = CType(GetService(GetType(IDesignerHost)), IDesignerHost)
    If designerHost IsNot Nothing And designerHost.RootComponent IsNot Nothing Then
        Dim workflowView As WorkflowView = _
                    CType(designerHost.RootComponent.Site.GetService(GetType(WorkflowView)), WorkflowView)
        If workflowView IsNot Nothing Then
            workflowView.Dock = DockStyle.Fill
            workflowView.TabIndex = 1
            workflowView.TabStop = True
            workflowView.HScrollBar.TabStop = False
            workflowView.VScrollBar.TabStop = False
            workflowView.Focus()
            workflowView.FitToWorkflowSize()
        End If
    End If
End Sub

適用対象

こちらもご覧ください