Vcl.JumpList.TCustomJumpList

De RAD Studio API Documentation
Aller à : navigation, rechercher

System.Classes.TComponentSystem.Classes.TPersistentSystem.TObjectTCustomJumpList

Delphi

TCustomJumpList = class(TComponent)

C++

class PASCALIMPLEMENTATION TCustomJumpList : public System::Classes::TComponent

Propriétés

Type Visibilité  Source Unité  Parent
class public
Vcl.JumpList.pas
Vcl.JumpList.hpp
Vcl.JumpList Vcl.JumpList


Description

JumpList.png

Classe de base pour les composants qui fournissent la prise en charge des listes de raccourcis Windows, commeTJumpList.

Les listes de raccourcis Windows ont été introduites dans Windows 7. Pour utiliser les sous-classes de TCustomJumpList, votre application doit être exécutée sur Windows 7 ou une version ultérieure. Lorsque TCustomJumpList est exécutée sur une version de Windows qui ne prend pas en charge les listes de raccourcis, TCustomJumpList.Enabled devient False.

Note: Enabled is False by default, remember to change its value to True for your jump list to work.

Les sous-classes de TCustomJumpList vous permettent de définir en mode conception une liste de tâches qui fournissent des raccourcis correspondant aux fonctionnalités de votre application, ainsi qu'un nombre quelconque de catégories personnalisées composées d'éléments personnalisés. Après avoir défini les tâches, les catégories personnalisées et les éléments, vous devez appeler UpdateList afin que les modifications soient visibles dans la liste des raccourcis de votre application. Alternativement, vous pouvez activer la propriété AutoRefresh de votre composant Liste de raccourcis si vous voulez que les modifications soient visibles dès l'exécution de votre application et après chaque modification apportée à la liste de raccourcis à l'exécution.

Note: Windows does not show empty lists.

Les utilisateurs peuvent retirer des tâches et des éléments personnalisés de la liste de tâches ainsi que des éléments personnalisés définis par votre application. Lorsque certaines méthodes telles que UpdateList sont appelées, ces dernières obtiennent une liste d'éléments ayant été retirés de la liste des raccourcis de votre application par l'utilisateur. Gérez l'événement OnItemDeleted pour faire le suivi de ces fichiers et les retirer de votre composant Liste de raccourcis. Rien n'empêche d'ajouter à nouveaux ces éléments à la liste de raccourcis, mais cette démarche n'est pas recommandée par Windows afin de respecter les choix effectués par les utilisateurs.

You can also modify the tasks and custom categories of your application at run time. You can use the following methods to manage your tasks and custom categories at run time, either :

Your jump list component provides an event, OnItemsLoaded, which occurs when the component finishes loading. If you want to define all your tasks or custom categories at run time instead of defining them at design time, this is the earliest point when you can define their initial values in the execution flow of your application.

Jump lists also allow you to show files that the user has opened with your application in the past. You can show recent files, frequent files, or both. Although showing both recent and frequent files is possible, Microsoft recommends using only one of these categories in each application.

Windows keeps these lists of files, which you can query using GetRecentList or GetFrequentList. The lists of recent and frequent files include files that your users opens manually or that your user opens from your application using TOpenDialog. You can also modify these lists at run time using the following methods: AddToRecent, RemoveFromRecent, RemoveAllFromRecent. These methods affect to both lists; that is, if you add or remove a file entry, you are adding or removing it from both the list of recent files and the list of frequent files. It is not possible to add or remove file entries from only one of those lists.

Note: Recent and frequent files are disabled in applications by default. For your application to be able to show recent or frequent files in its jump list, you application must meet either of the following requirements:
  • The user of your application must have opened at least one file using your application.
  • You must register your application as a file handler for one or more file types on the system.

When your application is made of multiple processes, you can use the ApplicationID property to keep a common jump list for all the processes of your application. If your application already uses Application User Model IDs, fill ApplicationID with the ID of your application.

If more than one instance of your application can be running at the same time, you must implement some mechanism that prevents two instances from modifying the application jump list at the same time. Otherwise, changes to the jump list from one instance of your application can overwrite changes made to the jump list from a different instance of your application.

Voir aussi