Vcl.JumpList.TCustomJumpList.AddItemToCategory
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 |
---|---|---|
|
| |
|
||
|
||
|
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:
See Also
- Vcl.JumpList.TJumpListItem.FriendlyName
- Vcl.JumpList.TJumpListItem.Path
- Vcl.JumpList.TJumpListItem.Arguments
- Vcl.JumpList.TJumpListItem.Icon
- Vcl.JumpList.TCustomJumpList.AddCategory
- Vcl.JumpList.TCustomJumpList.AutoRefresh
- Vcl.JumpList.TCustomJumpList.UpdateList