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

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

Splitter.MinSize プロパティ

分割コントロールと、そのコントロールドッキングされたコンテナの端との間に保持する必要のある最小距離を取得または設定しますSplitter.MinSize代わりに SplitContainer.Panel1MinSize と SplitContainer.Panel2MinSize が採用されているため、これは以前のバージョン互換性維持するためだけに残されています。

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

<LocalizableAttribute(True)> _
Public Property MinSize As
 Integer
Dim instance As Splitter
Dim value As Integer

value = instance.MinSize

instance.MinSize = value
[LocalizableAttribute(true)] 
public int MinSize { get;
 set; }
[LocalizableAttribute(true)] 
public:
property int MinSize {
    int get ();
    void set (int value);
}
/** @property */
public int get_MinSize ()

/** @property */
public void set_MinSize (int
 value)

プロパティ
Splitter コントロールと、そのコントロールドッキングされているコンテナの端との間の最小距離 (ピクセル単位)。既定値25 です。

解説解説
使用例使用例

Splitter コントロールを TreeView コントロールおよび ListView コントロール組み合わせて使用しWindows エクスプローラ類似したウィンドウ作成するコード例次に示しますTreeView コントロールおよび ListView コントロール識別するには、ノードと項目を両方コントロール追加します。この例では、Splitter の MinExtra プロパティおよび MinSize プロパティ使用してTreeView コントロールまたは ListView コントロール小さすぎるサイズ大きすぎるサイズ変更されないようにしています。この例では、この例で作成されているメソッドForm 内で定義し、その Formコンストラクタから呼び出す必要があります

Private Sub CreateMySplitControls()
   ' Create TreeView, ListView, and Splitter controls.
   Dim treeView1 As New
 TreeView()
   Dim listView1 As New
 ListView()
   Dim splitter1 As New
 Splitter()
   
   ' Set the TreeView control to dock to the left side of the form.
   treeView1.Dock = DockStyle.Left
   ' Set the Splitter to dock to the left side of the TreeView control.
   splitter1.Dock = DockStyle.Left
   ' Set the minimum size the ListView control can be sized to.
      splitter1.MinExtra = 100
   ' Set the minimum size the TreeView control can be sized to.
      splitter1.MinSize = 75
   ' Set the ListView control to fill the remaining space on the form.
      listView1.Dock = DockStyle.Fill

      ' Add a TreeView and a ListView item to identify the controls
 on the form.
      treeView1.Nodes.Add("TreeView Node")
      listView1.Items.Add("ListView Item")
   
   ' Add the controls in reverse order to the form to ensure proper
 location.
   Me.Controls.AddRange(New Control() {listView1,
 splitter1, treeView1})
End Sub 'CreateMySplitControls

private void CreateMySplitControls()
{
    // Create TreeView, ListView, and Splitter controls.
    TreeView treeView1 = new TreeView();
    ListView listView1 = new ListView();
    Splitter splitter1 = new Splitter();

    // Set the TreeView control to dock to the left side of the form.
    treeView1.Dock = DockStyle.Left;
    // Set the Splitter to dock to the left side of the TreeView control.
    splitter1.Dock = DockStyle.Left;
    // Set the minimum size the ListView control can be sized to.
    splitter1.MinExtra = 100;
    // Set the minimum size the TreeView control can be sized to.
    splitter1.MinSize = 75;
    // Set the ListView control to fill the remaining space on the form.
    listView1.Dock = DockStyle.Fill;
    // Add a TreeView and a ListView item to identify the controls on
 the form.
    treeView1.Nodes.Add("TreeView Node");
    listView1.Items.Add("ListView Item");

    // Add the controls in reverse order to the form to ensure proper
 location.
    this.Controls.AddRange(new Control[]{listView1,
 splitter1, treeView1});
}
private:
   void CreateMySplitControls()
   {
      // Create TreeView, ListView, and Splitter controls.
      TreeView^ treeView1 = gcnew TreeView;
      ListView^ listView1 = gcnew ListView;
      Splitter^ splitter1 = gcnew Splitter;

      // Set the TreeView control to dock to the left side of the form.
      treeView1->Dock = DockStyle::Left;

      // Set the Splitter to dock to the left side of the TreeView control.
      splitter1->Dock = DockStyle::Left;

      // Set the minimum size the ListView control can be sized to.
      splitter1->MinExtra = 100;

      // Set the minimum size the TreeView control can be sized to.
      splitter1->MinSize = 75;

      // Set the ListView control to fill the remaining space on the
 form.
      listView1->Dock = DockStyle::Fill;

      // Add a TreeView and a ListView item to identify the controls on
 the form.
      treeView1->Nodes->Add( "TreeView Node" );
      listView1->Items->Add( "ListView Item" );

      // Add the controls in reverse order to the form to ensure proper
 location.
      array<Control^>^temp0 = {listView1,splitter1,treeView1};
      this->Controls->AddRange( temp0 );
   }
private void CreateMySplitControls()
{
    // Create TreeView, ListView, and Splitter controls.
    TreeView treeView1 = new TreeView();
    ListView listView1 = new ListView();
    Splitter splitter1 = new Splitter();
    // Set the TreeView control to dock to the left side of the form.
    treeView1.set_Dock(DockStyle.Left);
    // Set the Splitter to dock to the left side of the TreeView control.
    splitter1.set_Dock(DockStyle.Left);
    // Set the minimum size the ListView control can be sized to.
    splitter1.set_MinExtra(100);
    // Set the minimum size the TreeView control can be sized to.
    splitter1.set_MinSize(75);
    // Set the ListView control to fill the remaining space on the form.
    listView1.set_Dock(DockStyle.Fill);
    // Add a TreeView and a ListView item to identify the controls on
 the 
    // form.
    treeView1.get_Nodes().Add("TreeView Node");
    listView1.get_Items().Add("ListView Item");
    // Add the controls in reverse order to the form to ensure proper
 
    // location.
    this.get_Controls().AddRange(new Control[]
 { listView1, splitter1, 
        treeView1 });
} //CreateMySplitControls
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS