Support & Community

Third party controls integration

Previous Table of Contents Next

To edit data, the treeview uses your operation system`s controls, which may differ from those used in your application.

OS scrollbar in the Office2007 style treeview

To fix this problem, Flexible TreeView allows you to change any control that is used in the treeview either to edit or display data (for example, scroll bars).

  • If you have a controls pack from DevExpress, DevComponents, or SkyBounds, Flexible TreeView already contains extensions to use them without any additional code. Note that these extensions are provided as source code that you may find in the Customization folder. To link these controls with the treeview, include the appropriate source code file and use the code below.
  • As well as built–in extensions for third–party controls you can easily use your own controls inside a treeview. To do that, see the provided extensions and create an extension for your control in the same way.



Change edit controls

Flexible TreeView uses many controls to edit data (edit controls) inside a node control. You can completely or partially override those controls, both in global or personal themes, by using the EditorRepository property.
There are three levels of overriding:

  • ThemeManager.ActiveManager.EditorRepository – override controls in all treeviews with a global theme;
  • TreeView.ThemeManager.EditorRepository – override controls in the treeview`s personal theme. Note that your changes will affect all treeviews with this theme manager;
  • TreeView.EditorRepository – override controls for that treeview only.

As stated above, you can use third party controls by using deployed extensions from the Customization folder. To do that, include a source code file with this extension and use the code below.

Example:

// replace the numeric editor for one treeview by a control from DevExpress.
tree.EditorRepository.NumericEditor = new DevExpressNumeric();
 
// replace the text editor for one treeview by a control from DevComponents.
tree.EditorRepository.TextBoxEditor = new DevComponentsTextBox();
 
// replace the text editor for all treeviews with global theme by own control.
ThemeManager.ActiveManager.EditorRepository.TextBoxEditor = new MyTextBoxEditor();
 
// replace the text editor for all treeviews with the same theme manager.
ThemeManagerOffice2007Blue tm = new ThemeManagerOffice2007Blue();
tm.EditorRepository.TextBoxEditor = new MyTextBoxEditorControl();
tree.ThemeManager = tm;
secondTree.ThemeManager = tm;


Scroll bars

By default, Flexible TreeView uses a standard OS`s scroll bar control, but you can replace it using the VertScrollBar and HorzScrollBar treeview properties. You can use either deployed extensions from the Customization/ScrollBars folder, or use your own by implementing the IScrollBarControl interface. Replacing scroll bars is similar to replacing edit controls as stated above.

Treeview with a custom scroll bar:

Custom scroll bar


Use custom edit controls

To create an extension for using your own control inside Flexible TreeView, you need to implement one of these interfaces, depending on the data type that your control supports and can edit:

  • ITextBoxEditorControl – for text editors.
  • IComboBoxEditorControl – for list editors using combobox.
  • INumericEditorControl – for numeric editors.

You can attach you control`s extension to the treeview as stated above.

Previous Top Next
Last news
Knowledge Base has been updated
Wednesday, 06 January 2010
Knowledge Base has been updated with new articles to describe v2.3 new features.
Flexible TreeView v2.3
Monday, 04 January 2010

Merry Christmas and Happy New Year!

We happy to announce Flexible TreeView v2.3 release with very important and useful new features.

Flexible TreeView v2.1
Monday, 30 November 2009

Flexible TreeView v2.1 maintenance release has been released.

Latest release

Version:
Release date:
2.3
Jan 04, 2010


Copyright © 2006-2010 ARMSoft. All rights reserved.