Synchronize Components
TJamShellLink is a non-visual control, enabling you to easily synchronize the path and filter properties of several visual shell components such as:
-
TJamFilterCombo
The effect is that you don’t need to handle specific component events to list the contents of the folder that is selected in the ShellTree or preview the file that is selected in the ShellList.
The following example illustrates how to easily link a TJamShellTree, a TJamShellList, and a TJamShellBreadCrumbBar:
Show transcription
This video contains no audio (silent screen recording). The following description conveys what is shown on screen.
The screen shows the RAD Studio 11 development environment (Delphi) with JAM Software's ShellBrowser components in the tool palette on the right. A new, empty form (Form1) is open in the form designer. The video demonstrates how to place several ShellBrowser controls on a form and link them with a ShellLink component so that they navigate in sync.
A caption reads “Add ShellTree”. A JamShellTree control is dropped onto the form; it shows a folder tree with Quick access, Desktop, Documents, Pictures, OneDrive and This PC.
A caption reads “align left”. In the Object Inspector, the control’s Align property is set to alLeft, so the folder tree docks to the left edge of the form.
A caption reads “Add ShellList”. A JamShellList control is added to the form next to the tree.
A caption reads “align client”. The list’s Align property is set to alClient, so it fills the remaining area and displays the contents of the selected folder (for example 3D Objects, Desktop, Documents, Downloads, Music) in a Name/Type table.
A caption reads “Add BreadCrumbBar”. A JamShellBreadCrumbBar control is added and its Align property is set to alTop, so it sits as an address/path bar along the top of the form above the file list.
A caption reads “Add ShellLink”. A non-visual JamShellLink component (TJamShellLink) is dropped onto the form from the palette; it appears as a small component icon and does not take up space in the layout.
A caption reads “Select the 3 controls using Shift + Click”. The three visual controls – the ShellTree, the ShellList and the BreadCrumbBar – are selected together by holding Shift and clicking each one. The Object Inspector now shows “3 items selected”.
A caption reads “Set the ‘ShellLink’ property to ‘JamShellLink1’”. With all three controls still selected, their shared ShellLink property is set to JamShellLink1 in the Object Inspector. This links the three controls to the same ShellLink, so that navigating in one control (for example selecting a folder in the tree) automatically updates the others.
To connect shell controls simply drop a TJamShellLink component on the form and assign the ShellLink property of all components to the ShellLink component.
The Refresh method enables you to refresh all connected shell controls.
You can disable a ShellLink component temporarily by using the Enabled property. If you want to use checkboxes in TJamShellTree or TJamShellList, they have to be connected to TJamShellLink. The ShellLink will synchronize the selected files and folders in the different shell controls.
Also see the API documentation to learn more.