Vcl.JumpList.TCustomJumpList.AddCategory
Delphi
function AddCategory(const CategoryName: string): Integer;
C++
int __fastcall AddCategory(const System::UnicodeString CategoryName);
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | Vcl.JumpList.pas Vcl.JumpList.hpp |
Vcl.JumpList | TCustomJumpList |
説明
カテゴリをカスタム カテゴリのリストへ指定されたカテゴリ名で追加し、そのリスト内の新しいカテゴリのインデックスを返します。
AddCategory により、実行時にカテゴリをリストに追加することができます。CustomCategories プロパティを使用すると、設計時にカテゴリを定義することができます。
AddCategory は、新しいカテゴリの Visible プロパティを True
にします。
Windows は、項目のあるカテゴリのみを表示します。AddCategory を呼び出した後、リストへ少なくとも項目を 1 つ追加することを忘れないでください。その後、AutoRefresh を有効にしていない場合には、リストを更新します。
Delphi:
CategoryIndex := JumpLists1.AddCategory('MyCategory');
JumpLists1.AddItemToCategory(CategoryIndex, 'MyItem', '', '', '');
JumpLists1.UpdateList;
C++:
int CategoryIndex = JumpLists1->AddCategory("MyCategory");
JumpLists1->AddItemToCategory(CategoryIndex, "MyItem", "", "", "");
JumpLists1->UpdateList();
これが結果です:
また、空の文字列をカテゴリ名として指定することができます。これが結果です:
関連項目
- Vcl.JumpList.TJumpCategoryItem
- Vcl.JumpList.TJumpCategoryItem.CategoryName
- System.Classes.TCollectionItem.Index
- Vcl.JumpList.TJumpCategoryItem.Visible