Form tree controls are a user-friendly way of displaying a hierarchy of related records like a company organizational structure, a bill of materials, projects, etc. Such a hierarchy can also be used in custom lookups allowing user to browse and select the required node in more convenient ways.
One of the previous recipes explained how to display the ledger budget model hierarchy in the Budget model form. In this recipe, we will reuse the previously created BudgetModelTree class to build a budget model tree lookup.
Property
Value
Name
BudgetModelLookup
Set its design properties to:
Property
Value
Frame
Border
WindowType
Popup
Add a new Tree control to the form's design.
Property
Value
Name
ModelTree
Add the following line to the form's class declaration:
BudgetModelTree budgetModelTree;
Override the form's
init()
with:public void init() { FormStringControl callingControl; ; callingControl = SysTableLookup...