Vcl.JumpList.TCustomJumpList.AddCategory

提供: RAD Studio API Documentation
移動先: 案内検索

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();

これが結果です:

JumpListsMyCategoryMyItem.png

また、空の文字列をカテゴリ名として指定することができます。これが結果です:

JumpListsEmptyCategoryMyItem.png

関連項目