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

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

PropertyGrid.PropertySort プロパティ

プロパティ表示するために PropertyGrid が使用する並べ替え種類取得または設定します

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

Public Property PropertySort As
 PropertySort
Dim instance As PropertyGrid
Dim value As PropertySort

value = instance.PropertySort

instance.PropertySort = value
public PropertySort PropertySort { get; set;
 }
public:
property PropertySort PropertySort {
    PropertySort get ();
    void set (PropertySort value);
}
/** @property */
public PropertySort get_PropertySort ()

/** @property */
public void set_PropertySort (PropertySort
 value)
public function get PropertySort
 () : PropertySort

public function set PropertySort
 (value : PropertySort)

プロパティ
PropertySort 値の 1 つ既定値は PropertySort.Categorized または PropertySort.Alphabetical です。

例外例外
例外種類条件

InvalidEnumArgumentException

代入された値が、PropertySort 値ではありません。

解説解説

PropertySort プロパティ設定すると、グリッド上のプロパティ並べ替えボタン外観変わりプロパティ現在の状態反映されます。PropertySort を PropertySort.NoSort に設定すると、プロパティ取得され順序表示されます。

PropertySort を、Alphabetical および Categorized両方設定することは、PropertySortCategorized だけに設定することと同じです。カテゴリ分類されビューは、必ずアルファベット順表示されます。

メモメモ

カスタム並べ替えを行うには、コンポーネントに ICustomTypeDescriptor を実装して、希望する順序プロパティ返すようにします。

使用例使用例

PropertySort プロパティと ToolBarVisible プロパティ使用して PropertyGrid コントロール初期化する方法次のコード例示しますまた、この例では、PropertyGrid コントロールVisible プロパティfalse設定して、例を実行したときにグリッド表示されないようにしています。この例を実行するには、次のコードフォーム貼り付けてフォームコンストラクタまたは Loadイベント処理メソッドInitializePropertyGrid メソッド呼び出します。フォーム実行時プロパティ グリッド表示するには、グリッドVisible プロパティtrue変更しフォームを再コンパイルして実行します

// Declare a propertyGrid.
internal PropertyGrid propertyGrid1;

// Initialize propertyGrid1.
private void InitializePropertyGrid()
{
    propertyGrid1 = new PropertyGrid();
    propertyGrid1.Name = "PropertyGrid1";
    propertyGrid1.Location = new System.Drawing.Point(185, 20);
    propertyGrid1.Size = new System.Drawing.Size(150, 300);
    propertyGrid1.TabIndex = 5;

    // Set the sort to alphabetical and set Toolbar visible
    // to false, so the user cannot change the sort.
    propertyGrid1.PropertySort = PropertySort.Alphabetical;
    propertyGrid1.ToolbarVisible = false;
    propertyGrid1.Text = "Property Grid";

    // Add the PropertyGrid to the form, but set its
    // visibility to False so it will not appear when the form loads.
    propertyGrid1.Visible = false;
    this.Controls.Add(propertyGrid1);

}
   // Declare a propertyGrid.
internal:
   PropertyGrid^ propertyGrid1;

private:

   // Initialize propertyGrid1.
   [PermissionSetAttribute(SecurityAction::Demand, Name="FullTrust")]
   void InitializePropertyGrid()
   {
      propertyGrid1 = gcnew PropertyGrid;
      propertyGrid1->Name = "PropertyGrid1";
      propertyGrid1->Location = System::Drawing::Point( 185, 20 );
      propertyGrid1->Size = System::Drawing::Size( 150, 300 );
      propertyGrid1->TabIndex = 5;
      
      // Set the sort to alphabetical and set Toolbar visible
      // to false, so the user cannot change the sort.
      propertyGrid1->PropertySort = PropertySort::Alphabetical;
      propertyGrid1->ToolbarVisible = false;
      propertyGrid1->Text = "Property Grid";
      
      // Add the PropertyGrid to the form, but set its
      // visibility to False so it will not appear when the form loads.
      propertyGrid1->Visible = false;
      this->Controls->Add( propertyGrid1 );
   }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2024 GRAS Group, Inc.RSS