SftTree/DLL 7.5 Documentation

Cell Editing

SftTree/DLL supports editing of cell text using a unique approach. SftTree/DLL will notify your application of certain events (such as double-clicking on a tree item). Your application can then create any Windows control at a location specified by SftTree/DLL. The Windows control is "attached" to the tree control, but your application receives all messages and notifications for the new control, so even owner-drawn controls or custom controls can be used. SftTree/DLL will notify your application when editing (using your control) should end, either with or without data validation.

The SftTree/DLL Wizard can be used to generate sample code implementing cell editing. The sample code uses an edit control, but any Windows control can be used instead.

To simplify handling of special keystrokes such as Escape, Return, arrow keys, which are normally handled by the child window, these can be intercepted by the application using SetKeyHandling. Once a keystroke for a child window is intercepted during cell editing, the SFTTREEN_KEYINTERCEPTED notification occurs. The intercepted key can be retrieved using the GetKeyHandling function. Using SetKeyHandling eliminates the need to subclass the child window, simplifying the implementation of cell editing.

By intercepting the Tab, Return and arrow keys, simple cell navigation while cell editing is possible. Individual items can be ignored for cell editing using the SetItemEditIgnore function. Or individual cells can be ignored for cell editing using the SFTTREE_CELL structure's flag2 member (SFTTREECELL_EDITIGNORE).

The CellEditing example demonstrates the techniques used for cell editing with complete cell navigation using edit controls and combo boxes.