I wanted to start a series of posts on some of the extended QControls that come already installed with the QControl Toolkit. There is no separate download for these. To get them just install the QControl Tool Kit available here:
The QControl Toolkit on LabVIEW Tools Network
After installed, examples can be found in the NI Example Finder and the Controls (Facades) and the methods can be found in the Addons-->QControl Palettes.
The QControl Toolkit on LabVIEW Tools Network
After installed, examples can be found in the NI Example Finder and the Controls (Facades) and the methods can be found in the Addons-->QControl Palettes.
Overview
This TreeDirectory QControl displays the entire contents of a directory (files, folders, subfolders, etc.) in a tree control. Even very large or deep directories can be loaded. This is because the TreeDirectory QControl loads the tree via lazy load, which means it won't load the next level down until it is clicked on.
There is an example in the Example Finder (shown below) when the toolkit is installed.
To load the tree, write the desired path into a property node with the Directory Property.
Also, the TreeDirectory QControl has the added function of opening the file that was double-clicked in the tree.
It was my intention to extend this further by adding properties to include folders only, or to disallow the double-click open feature but I never added in. I wanted to use it to make a LabVIEW only folder selector similar to the folder selector in Windows.
The awesome thing about QControls is I can still add those features. This is done by creating a new QControl that inherits from the TreeDirectory QControl then adds the functionality. Maybe that will be a future release.
Comments
Post a Comment