ToolStripDropDown.DefaultDropDownDirection プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ToolStripDropDown.DefaultDropDownDirection プロパティの意味・解説 

ToolStripDropDown.DefaultDropDownDirection プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

ToolStrip を基準として、ToolStripDropDown が表示される相対的な方向取得または設定します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Overrides Property
 DefaultDropDownDirection As ToolStripDropDownDirection
Dim instance As ToolStripDropDown
Dim value As ToolStripDropDownDirection

value = instance.DefaultDropDownDirection

instance.DefaultDropDownDirection = value
public override ToolStripDropDownDirection DefaultDropDownDirection
 { get; set; }
public:
virtual property ToolStripDropDownDirection DefaultDropDownDirection {
    ToolStripDropDownDirection get () override;
    void set (ToolStripDropDownDirection value)
 override;
}
/** @property */
public ToolStripDropDownDirection get_DefaultDropDownDirection
 ()

/** @property */
public void set_DefaultDropDownDirection (ToolStripDropDownDirection
 value)
public override function get
 DefaultDropDownDirection () : ToolStripDropDownDirection

public override function set
 DefaultDropDownDirection (value : ToolStripDropDownDirection)

プロパティ
ToolStripDropDownDirection 値の 1 つ

使用例使用例

オプション ボタン指定基づいて DefaultDropDownDirection プロパティ割り当てる方法次のコード例示します

' The following methods handle the CheckChanged event 
' for all the radio buttons. Each method calls a utility
' method to set the ToolStripDropDownDirection appropriately.
Private Sub radioButton1_CheckedChanged(sender
 As Object, e As EventArgs)
 Handles radioButton1.CheckedChanged
   Me.HandleRadioButton(sender, ToolStripDropDownDirection.AboveLeft)
 End Sub


Private Sub radioButton2_CheckedChanged(sender
 As Object, e As EventArgs)
 Handles radioButton2.CheckedChanged
   Me.HandleRadioButton(sender, ToolStripDropDownDirection.AboveRight)
 End Sub


Private Sub radioButton3_CheckedChanged(sender
 As Object, e As EventArgs)
 Handles radioButton3.CheckedChanged
   Me.HandleRadioButton(sender, ToolStripDropDownDirection.BelowLeft)
 End Sub


Private Sub radioButton4_CheckedChanged(sender
 As Object, e As EventArgs)
 Handles radioButton4.CheckedChanged
   Me.HandleRadioButton(sender, ToolStripDropDownDirection.BelowRight)
 End Sub


Private Sub radioButton5_CheckedChanged(sender
 As Object, e As EventArgs)
 Handles radioButton5.CheckedChanged
   Me.HandleRadioButton(sender, ToolStripDropDownDirection.Default)
 End Sub


Private Sub radioButton6_CheckedChanged(sender
 As Object, e As EventArgs)
 Handles radioButton6.CheckedChanged
   Me.HandleRadioButton(sender, ToolStripDropDownDirection.Left)
 End Sub


Private Sub radioButton7_CheckedChanged(sender
 As Object, e As EventArgs)
 Handles radioButton7.CheckedChanged
   Me.HandleRadioButton(sender, ToolStripDropDownDirection.Right)
 End Sub


 ' This utility method sets the DefaultDropDownDirection property.
Private Sub HandleRadioButton(sender As
 Object, direction As ToolStripDropDownDirection)
     Dim rb As RadioButton = CType(sender,
 RadioButton)
   
     If rb IsNot Nothing Then
         If rb.Checked Then
             Me.dropDownDirection = direction
             Me.contextMenuStrip1.DefaultDropDownDirection = direction
         End If
     End If
 End Sub
// The following methods handle the CheckChanged event 
// for all the radio buttons. Each method calls a utility
// method to set the ToolStripDropDownDirection appropriately.

private void radioButton1_CheckedChanged(object
 sender, EventArgs e)
{
    this.HandleRadioButton(sender, ToolStripDropDownDirection.AboveLeft);
}

private void radioButton2_CheckedChanged(object
 sender, EventArgs e)
{
    this.HandleRadioButton(sender, ToolStripDropDownDirection.AboveRight);
}

private void radioButton3_CheckedChanged(object
 sender, EventArgs e)
{
    this.HandleRadioButton(sender, ToolStripDropDownDirection.BelowLeft);
}

private void radioButton4_CheckedChanged(object
 sender, EventArgs e)
{
    this.HandleRadioButton(sender, ToolStripDropDownDirection.BelowRight);
}

private void radioButton5_CheckedChanged(object
 sender, EventArgs e)
{
    this.HandleRadioButton(sender, ToolStripDropDownDirection.Default);
}

private void radioButton6_CheckedChanged(object
 sender, EventArgs e)
{
    this.HandleRadioButton(sender, ToolStripDropDownDirection.Left);
}

private void radioButton7_CheckedChanged(object
 sender, EventArgs e)
{
    this.HandleRadioButton(sender, ToolStripDropDownDirection.Right);
}

// This utility method sets the DefaultDropDownDirection property.
private void HandleRadioButton(object sender,
 ToolStripDropDownDirection direction)
{
    RadioButton rb = sender as RadioButton;

    if (rb != null)
    {
        if (rb.Checked)
        {
            this.dropDownDirection = direction;
            this.contextMenuStrip1.DefaultDropDownDirection =
 direction;
        }
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からToolStripDropDown.DefaultDropDownDirection プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からToolStripDropDown.DefaultDropDownDirection プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からToolStripDropDown.DefaultDropDownDirection プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

ToolStripDropDown.DefaultDropDownDirection プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ToolStripDropDown.DefaultDropDownDirection プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS