Vcl.JumpList.TCustomJumpList.AddTaskSeparator

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function AddTaskSeparator: TJumpListItem;

C++

TJumpListItem* __fastcall AddTaskSeparator();

Properties

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

Description

Adds a list item that works as a separator to the built-in "Tasks" category, and returns your new list item.

AddTaskSeparator lets you add list items to the built-in "Tasks" category at run time. Use the TasksList property of your jump lists object to define your list items at design time.

AddTaskSeparator makes the IsSeparator and Visible properties of the new list item True.

After you call AddTaskSeparator, remember to refresh the jump lists if you have not enabled AutoRefresh.

Separators are only visible between regular list items. For example, the following code:

Delphi:

JumpLists1.AddTaskSeparator;
JumpLists1.AddTask('MyFirstTask', '', '', '');
JumpLists1.AddTaskSeparator;
JumpLists1.AddTask('MySecondTask', '', '', '');
JumpLists1.AddTaskSeparator;
JumpLists1.UpdateList;

C++:

JumpLists1->AddTaskSeparator();
JumpLists1->AddTask("MyFirstTask", "", "", "");
JumpLists1->AddTaskSeparator();
JumpLists1->AddTask("MySecondTask", "", "", "");
JumpLists1->AddTaskSeparator();
JumpLists1->UpdateList();

Has the following result:

JumpListsTaskListMySeparator.png

See Also