Vcl.JumpList.TCustomJumpList.AddItemToCategory

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function AddItemToCategory(CategoryIndex: Integer; const FriendlyName: string; const Path: string = '';  const Arguments: string = ''; const Icon: string = ''): TJumpListItem;

C++

TJumpListItem* __fastcall AddItemToCategory(int CategoryIndex, const System::UnicodeString FriendlyName, const System::UnicodeString Path = System::UnicodeString(), const System::UnicodeString Arguments = System::UnicodeString(), const System::UnicodeString Icon = System::UnicodeString());

Properties

Type Visibility Source Unit Parent
function public
Vcl.JumpList.pas
Vcl.JumpList.hpp
Vcl.JumpList TCustomJumpList

Description

Adds a list item to the category with the specified index, and returns your new list item.

AddItemToCategory lets you add list items to categories at run time. Use the Items property of a category to define your list items at design time.

CategoryIndex is the index of the target category. Use the remaining parameters to define the properties of your new list item:

Parameter Property Notes

FriendlyName

FriendlyName

  • Must be a non-empty string.

Path

Path

Arguments

Arguments

Icon

Icon

AddItemToCategory makes the Visible property of the new list item True. Also, new list items are not separators by default.

After you call AddItemToCategory, remember to refresh the jump lists if you have not enabled AutoRefresh:

Delphi:

JumpLists1.AddItemToCategory(CategoryIndex, 'MyItem');
JumpLists1.UpdateList;

C++:

JumpLists1->AddItemToCategory(CategoryIndex, "MyItem");
JumpLists1->UpdateList();

This is the result:

JumpListsMyCategoryMyItem.png

See Also