Skip to main content

Overview

TeeTree provides built-in support for zooming and scrolling, allowing users to navigate large tree structures efficiently. You can control zoom levels programmatically and configure scrolling behavior.

Zooming

Set Zoom Level

Control the zoom level using the View3DOptions.Zoom property:

Zoom with TrackBar

Create an interactive zoom control:

Reset Zoom and View

OnZoom Event

Respond to zoom changes:

Centered Zooming

Control whether zooming is centered on the current view:

Allow/Disallow Zooming

Scrolling (Panning)

Enable Scrolling

Configure scrolling direction:

Set Scroll Mouse Button

Specify which mouse button activates scrolling:

OnScroll Event

Respond to scrolling changes:

Programmatic Scrolling

Set scroll position directly:

Complete Zooming Example

Here’s a complete example with zoom controls:

Complete Scrolling Example

Here’s a complete example with scroll controls:

Mouse Wheel Support

TeeTree automatically supports mouse wheel scrolling. Configure it with:

Key Points

  • Use View3DOptions.Zoom to control zoom level (percentage)
  • Use ZoomCentered to control zoom behavior
  • Use AllowPanning to enable/disable scrolling
  • Use ScrollMouseButton to specify which button activates scrolling
  • Use OnZoom and OnScroll events to update UI
  • Use View3DOptions.HorizOffset and VertOffset for programmatic scrolling
  • Disable Zoom.Allow to prevent users from zooming
  • Mouse wheel scrolling is supported automatically
  • Reset view by setting zoom to 100 and offsets to 0