jsTreeView and jsSysTreeView Design and Description


The following is a brief description of basic overall operation and design of the jsTreeView dBL class. Because the jsSysTreeView class is a subclass of the jsTreeView class, this description also applies to the jsSysTreeView class. Don't worry if you don't clearly understand what is described. Simply read it for purposes of 'awareness'. Much of the following will become clearer as you become familiar with using jsTreeView. In reality, jsTreeView is quite simple to use. What follows is a small attempt to satisfy those who want to know 'just a bit more'.

jsTreeView is a subclass of the stock TreeView dBL class. It can be placed on a Form, a SubForm, a Container, or a NoteBook.

At runtime, a jsTreeView object will function the same as the stock TreeView. None of the default stock TreeView operation has been changed. jsTreeView simply adds functionality that does not exist in the stock TreeView.

Like most of the visual UI classes in the core product, the TreeView class in the core product is not created by the core product. Rather, it is surfaced by the core product from the operating system. dBASE simply 'surfaces' the TreeView in a manner that is compatible and consistent with the dBL language. The additional functionality of the jsTreeView class is achieved through the operating system's API in the same way that dBASE itself talks to the API to create a TreeView and surface the dBL access through the stock TreeView class. jsTreeView simply uses API functionality to surface additional items that have not been exploited by the core product.

The TreeView window is a message-based window rather than a function-based window. Almost all functionality is implemented via messages sent to the TreeView window. Some of these messages use complex data structures to pass information to and from the TreeView window. The jsTreeView class implements methods (functions) which provide dBL access to the messages and structures. Each method encapsulates a specific message supported by the TreeView window by creating and filling any necessary data structures, sending the appropriate message to the TreeView window, and by retrieving any returned data as necessary from the associated data structures.

Don't let the discussion here regarding API, structures, and messages scare you away. jsTreeView makes it easy to extend TreeView functionality in dBL application code without needing to know how to work with structures or talk to any API. jsTreeView bridges the gap between the application dBL code and the TreeView window via the windows API. Through a few added methods, the advanced functionality of the jsTreeView class can be directly exploited using relatively simple dBL application code.

Because the jsTreeView class is, in the most simple definition, a dBL 'wrapper' for the operating system's TreeView window class, the most authoritative resource for information regarding TreeView technology, operation, and reference can be found at MSDN online under Individual Control Reference. Also, be sure to search MSDN for other information and examples of using the TreeView.

But most of all, be sure to read the remaining jsTreeView documentation. And review the dBL sample forms included with the jsTreeView package to become more familiar with how jsTreeView can be used in dBL applications.