HeaderPane
Main
Hide

SftTree/OCX 8.0 - ActiveX Tree Control

Share Link
Print

Virtual Sample (VB6)

This sample illustrates using virtual mode with cell editing.

The source code is located at C:\Program Files (x86)\Softelvdm\SftTree OCX 8.0\Samples\VB6\Virtual\Form1.frm or C:\Program Files\Softelvdm\SftTree OCX 8.0\Samples\VB6\Virtual\Form1.frm (on 32-bit Windows versions).

VERSION 5.00
Object = "{04048830-2BE4-4868-8CDC-B8E6FC7815C5}#7.5#0"; "SftTree_IX86_U_80.ocx"
Begin VB.Form Form1 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Softel vdm, Inc. - Virtual Sample"
   ClientHeight    =   6240
   ClientLeft      =   900
   ClientTop       =   1230
   ClientWidth     =   6960
   BeginProperty Font 
      Name            =   "Microsoft Sans Serif"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   6240
   ScaleWidth      =   6960
   Begin SftTreeLib80.SftTree SftTree1 
      Height          =   6015
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   5295
      PropVer         =   75
      xcx             =   9340
      xcy             =   10610
      PropFile        =   ""
      PropDesignTime  =   1
      DeletePropFile  =   0
      IntVal          =   55
      xBfStyle1       =   64044624
      xBfStyle2       =   -445166369
      xBfStyle3       =   -492433761
      xBfStyle4       =   223998321
      FlatProperties  =   0
      Appearance      =   1
      AutoRespond     =   0
      BackgroundStyle =   0
      BackgroundX     =   0
      BackgroundY     =   0
      BorderStyle     =   0
      ButtonStyle     =   0
      CellEventHandling=   0
      CellEditStyle   =   0
      CellEditLimit   =   0
      ColumnCount     =   5
      CopyItemDataString=   0
      CustomCode      =   0
      DragImage       =   -842150451
      DragMethod      =   1
      DragType        =   3
      Enabled         =   1
      HandleReturn    =   -842150451
      MouseIcon       =   "Form1.frx":0000
      MousePointer    =   0
      LeftButtonOnly  =   -1
      LeftItemClickOnly=   0
      OLEDropMode     =   0
      RightToLeft     =   0
      UseThemes       =   -1  'True
      Scrollbars      =   3
      ScrollbarStyle  =   0
      ShowTruncated   =   -1
      VAlignStyle     =   0
      VirtualMode     =   1
      WebLicense      =   ""
      SmoothScroll    =   1
      ButtonAppearance=   8
      MouseOverTransitionEffect=   0
      EdgeVerticalColor=   -1
      EdgeHorizontalColor=   -1
      BeginProperty ItemEditFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Microsoft Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Columns {9EBAA93E-293D-44FA-9989-08F078763A1F} 
         InheritBgColor  =   0
         OpenEnded       =   1
         OpenEnded2      =   1
      EndProperty
      BeginProperty Headers {9EBAA936-293D-44FA-9989-08F078763A1F} 
         Appearance      =   1
         BackColor       =   -2147483633
         ForeColor       =   -2147483630
         GrayedColor     =   -2147483631
         HilightColor    =   -2147483628
         Multiline       =   0
         ShadowColor     =   -2147483632
         Reorderable     =   1
         Resizable       =   1
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Microsoft Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         SortIndicators  =   0
      EndProperty
      BeginProperty Footers {9EBAA956-293D-44FA-9989-08F078763A1F} 
         Appearance      =   0
         BackColor       =   -2147483633
         ForeColor       =   -2147483630
         GrayedColor     =   -2147483631
         HilightColor    =   -2147483628
         Multiline       =   1
         ShadowColor     =   -2147483632
         Reorderable     =   1
         Resizable       =   1
      EndProperty
      BeginProperty Items {9EBAA93C-293D-44FA-9989-08F078763A1F} 
         AutoExpandDragDrop=   1
         AutoExpandHover =   0
         BackColor       =   -2147483643
         BackColorOdd    =   -2147483643
         CalcLimit       =   500
         CalcVisibleOnly =   0
         Cell3D          =   0
         CharSearchColumn=   0
         CharSearchMode  =   0
         DropHighlightColor=   -2147483635
         DropHighlightStyle=   1
         EditNoFocusStyle=   2
         FlybyHighlight  =   1
         ForeColor       =   -2147483640
         ForeColorOdd    =   -2147483640
         GrayedColor     =   -2147483631
         GridHorizontalColor=   -2147483632
         GridStyle       =   0
         GridVerticalColor=   -2147483632
         HilightColor    =   -2147483628
         HorizontalExtentPix=   0
         HorizontalExtent2Pix=   0
         HorizontalOffsetPix=   0
         HorizontalOffset2Pix=   0
         Indentation     =   -1
         ItemImageAlign  =   0
         Lines           =   1
         MaxHeightPix    =   0
         MinHeightPix    =   0
         MultiSelect     =   0
         NoFocusStyle    =   1
         NoSelection     =   0
         RubberbandSelection=   1
         SelectBackColor =   -2147483635
         SelectBackColorNoFocus=   -2147483635
         SelectForeColor =   -2147483634
         SelectForeColorNoFocus=   -2147483634
         ShadowColor     =   -2147483632
         Style           =   0
         ScrollTips      =   1
         SelectionArea   =   0
         SelectStyle     =   0
         ShowFocusRectangle=   1
         ToolTipAlways   =   0
         ToolTipBackColor=   -1
         ToolTipForeColor=   -1
         ToolTipsUseEntireCell=   1
         TopIndex        =   0
         TreeLineColor   =   -2147483630
         TreeLineGrayedColor=   -2147483631
         TreeLineStyle   =   0
         UpdateCurrentExpandCollapse=   0
         OutlineStyle    =   0
         SelectOutlineBorderColor=   -1
         SelectInnerBorderColor=   -1
         SelectInnerFill1=   -1
         SelectInnerFill2=   -1
         SelectHotOutlineBorderColor=   -1
         SelectHotInnerBorderColor=   -1
         SelectHotInnerFill1=   -1
         SelectHotInnerFill2=   -1
         SelectNoFocusOutlineBorderColor=   -1
         SelectNoFocusInnerBorderColor=   -1
         SelectNoFocusInnerFill1=   -1
         SelectNoFocusInnerFill2=   -1
         HotOutlineBorderColor=   -1
         HotInnerBorderColor=   -1
         HotInnerFill1   =   -1
         HotInnerFill2   =   -1
         DropTargetOutlineBorderColor=   -1
         DropTargetInnerBorderColor=   -1
         DropTargetInnerFill1=   -1
         DropTargetInnerFill2=   -1
         DisabledItemsSelectable=   1
         AutoExpandDragDropInterval=   1200
         AutoExpandHoverInterval=   1200
         ToolTipIntervalOn=   200
         ToolTipIntervalOff=   100
         BeginProperty ItemImageExpandable {980702E2-0AB6-41B1-9B85-F8755A697255} 
            Object.Height          =   0
            Object.Width           =   0
            Picture         =   "Form1.frx":001C
            Appearance      =   -1
            FrameColor      =   -1
            SampleColor     =   -1
         EndProperty
         BeginProperty ItemImageExpanded {980702E2-0AB6-41B1-9B85-F8755A697255} 
            Object.Height          =   0
            Object.Width           =   0
            Picture         =   "Form1.frx":012E
            Appearance      =   -1
            FrameColor      =   -1
            SampleColor     =   -1
         EndProperty
         BeginProperty ItemImageLeaf {980702E2-0AB6-41B1-9B85-F8755A697255} 
            Object.Height          =   0
            Object.Width           =   0
            Picture         =   "Form1.frx":0240
            Appearance      =   -1
            FrameColor      =   -1
            SampleColor     =   -1
         EndProperty
      EndProperty
      BeginProperty RowColumnHeader {9EBAA942-293D-44FA-9989-08F078763A1F} 
         Appearance      =   1
         ButtonDown      =   0
         RemainUp        =   1
         Enabled         =   1
         ImageHAlign     =   1
         ImageVAlign     =   0
         TextHAlign      =   0
         TextVAlign      =   0
         Text            =   ""
         ForeColor       =   -2147483630
         BackColor       =   -2147483633
         HilightColor    =   -2147483628
         ShadowColor     =   -2147483632
         GrayedColor     =   -2147483631
         BeginProperty Image {980702E2-0AB6-41B1-9B85-F8755A697255} 
            Object.Height          =   0
            Object.Width           =   0
            Picture         =   "Form1.frx":0352
            Appearance      =   -1
            FrameColor      =   -1
            SampleColor     =   -1
         EndProperty
         OverrideTheme   =   0
      EndProperty
      BeginProperty RowColumnFooter {9EBAA95A-293D-44FA-9989-08F078763A1F} 
         Appearance      =   1
         ButtonDown      =   0
         RemainUp        =   1
         Enabled         =   1
         ImageHAlign     =   0
         ImageVAlign     =   0
         TextHAlign      =   0
         TextVAlign      =   0
         Text            =   ""
         ForeColor       =   -2147483630
         BackColor       =   -2147483633
         HilightColor    =   -2147483628
         ShadowColor     =   -2147483632
         GrayedColor     =   -2147483631
         OverrideTheme   =   0
      EndProperty
      BeginProperty RowHeaders {9EBAA944-293D-44FA-9989-08F078763A1F} 
         Appearance      =   3
         RemainUp        =   1
         Enabled         =   1
         Lines           =   1
         TextHAlign      =   0
         TextVAlign      =   0
         Object.Width           =   28
         BackColor       =   -2147483633
         ForeColor       =   -2147483630
         GrayedColor     =   -2147483631
         HilightColor    =   -2147483628
         ShadowColor     =   -2147483632
         SelectBackColor =   -2147483633
         SelectForeColor =   -2147483630
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Microsoft Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      EndProperty
      BeginProperty Splitter {9EBAA94A-293D-44FA-9989-08F078763A1F} 
         SplitColumn     =   0
         Object.Visible         =   0
         OffsetPix       =   0
         WidthPix        =   7
      EndProperty
      BeginProperty Column(0) {9EBAA938-293D-44FA-9989-08F078763A1F} 
         BackColor       =   -1
         CellHAlign      =   0
         CellMultiline   =   0
         CellVAlign      =   0
         CellWordWrap    =   0
         ForeColor       =   -1
         Merge           =   0
         MergeInto       =   0
         MinWidth        =   0
         SelectBackColor =   -1
         SelectForeColor =   -1
         ToolTip         =   1
         Object.Width           =   83
         RealPos         =   0
         DispPos         =   0
         BackColorEnd    =   -1
         SelectBackColorEnd=   -1
         ProgressColor   =   -1
         ProgressColorEnd=   -1
         BackColorOrientation=   0
         ProgressColor   =   -1
         ProgressColorEnd=   -1
         ProgressColorOrientation=   0
         ProgressStyle   =   0
      EndProperty
      BeginProperty Header(0) {9EBAA93A-293D-44FA-9989-08F078763A1F} 
         Enabled         =   1
         KeepPosition    =   0
         Locked          =   0
         ImageHAlign     =   0
         ImageVAlign     =   0
         RemainUp        =   1
         Text            =   "Items"
         TextHAlign      =   0
         TextVAlign      =   0
         BackColor       =   -1
         ForeColor       =   -1
         SelectBackColor =   -1
         SelectForeColor =   -1
         BackColorDisabled=   -1
         ForeColorDisabled=   -1
         OverrideTheme   =   0
         Button          =   0
      EndProperty
      BeginProperty Footer(0) {9EBAA958-293D-44FA-9989-08F078763A1F} 
         Enabled         =   1
         KeepPosition    =   0
         ImageHAlign     =   0
         ImageVAlign     =   0
         RemainUp        =   0
         Text            =   ""
         TextHAlign      =   0
         TextVAlign      =   0
         BackColor       =   -1
         ForeColor       =   -1
         SelectBackColor =   -1
         SelectForeColor =   -1
         BackColorDisabled=   -1
         ForeColorDisabled=   -1
         OverrideTheme   =   0
         Button          =   0
      EndProperty
      BeginProperty Column(1) {9EBAA938-293D-44FA-9989-08F078763A1F} 
         BackColor       =   -1
         CellHAlign      =   0
         CellMultiline   =   0
         CellVAlign      =   0
         CellWordWrap    =   0
         ForeColor       =   -1
         Merge           =   0
         MergeInto       =   0
         MinWidth        =   0
         SelectBackColor =   -1
         SelectForeColor =   -1
         ToolTip         =   1
         Object.Width           =   83
         RealPos         =   1
         DispPos         =   1
         BackColorEnd    =   -1
         SelectBackColorEnd=   -1
         ProgressColor   =   -1
         ProgressColorEnd=   -1
         BackColorOrientation=   0
         ProgressColor   =   -1
         ProgressColorEnd=   -1
         ProgressColorOrientation=   0
         ProgressStyle   =   0
      EndProperty
      BeginProperty Header(1) {9EBAA93A-293D-44FA-9989-08F078763A1F} 
         Enabled         =   1
         KeepPosition    =   0
         Locked          =   0
         ImageHAlign     =   0
         ImageVAlign     =   0
         RemainUp        =   1
         Text            =   "Second Column"
         TextHAlign      =   0
         TextVAlign      =   0
         BackColor       =   -1
         ForeColor       =   -1
         SelectBackColor =   -1
         SelectForeColor =   -1
         BackColorDisabled=   -1
         ForeColorDisabled=   -1
         OverrideTheme   =   0
         Button          =   0
      EndProperty
      BeginProperty Footer(1) {9EBAA958-293D-44FA-9989-08F078763A1F} 
         Enabled         =   1
         KeepPosition    =   0
         ImageHAlign     =   0
         ImageVAlign     =   0
         RemainUp        =   0
         Text            =   ""
         TextHAlign      =   0
         TextVAlign      =   0
         BackColor       =   -1
         ForeColor       =   -1
         SelectBackColor =   -1
         SelectForeColor =   -1
         BackColorDisabled=   -1
         ForeColorDisabled=   -1
         OverrideTheme   =   0
         Button          =   0
      EndProperty
      BeginProperty Column(2) {9EBAA938-293D-44FA-9989-08F078763A1F} 
         BackColor       =   -1
         CellHAlign      =   0
         CellMultiline   =   0
         CellVAlign      =   0
         CellWordWrap    =   0
         ForeColor       =   -1
         Merge           =   0
         MergeInto       =   0
         MinWidth        =   0
         SelectBackColor =   -1
         SelectForeColor =   -1
         ToolTip         =   1
         Object.Width           =   83
         RealPos         =   2
         DispPos         =   2
         BackColorEnd    =   -1
         SelectBackColorEnd=   -1
         ProgressColor   =   -1
         ProgressColorEnd=   -1
         BackColorOrientation=   0
         ProgressColor   =   -1
         ProgressColorEnd=   -1
         ProgressColorOrientation=   0
         ProgressStyle   =   0
      EndProperty
      BeginProperty Header(2) {9EBAA93A-293D-44FA-9989-08F078763A1F} 
         Enabled         =   1
         KeepPosition    =   0
         Locked          =   0
         ImageHAlign     =   0
         ImageVAlign     =   0
         RemainUp        =   1
         Text            =   "Third"
         TextHAlign      =   0
         TextVAlign      =   0
         BackColor       =   -1
         ForeColor       =   -1
         SelectBackColor =   -1
         SelectForeColor =   -1
         BackColorDisabled=   -1
         ForeColorDisabled=   -1
         OverrideTheme   =   0
         Button          =   0
      EndProperty
      BeginProperty Footer(2) {9EBAA958-293D-44FA-9989-08F078763A1F} 
         Enabled         =   1
         KeepPosition    =   0
         ImageHAlign     =   0
         ImageVAlign     =   0
         RemainUp        =   0
         Text            =   ""
         TextHAlign      =   0
         TextVAlign      =   0
         BackColor       =   -1
         ForeColor       =   -1
         SelectBackColor =   -1
         SelectForeColor =   -1
         BackColorDisabled=   -1
         ForeColorDisabled=   -1
         OverrideTheme   =   0
         Button          =   0
      EndProperty
      BeginProperty Column(3) {9EBAA938-293D-44FA-9989-08F078763A1F} 
         BackColor       =   -1
         CellHAlign      =   0
         CellMultiline   =   0
         CellVAlign      =   0
         CellWordWrap    =   0
         ForeColor       =   -1
         Merge           =   0
         MergeInto       =   0
         MinWidth        =   0
         SelectBackColor =   -1
         SelectForeColor =   -1
         ToolTip         =   1
         Object.Width           =   83
         RealPos         =   3
         DispPos         =   3
         BackColorEnd    =   -1
         SelectBackColorEnd=   -1
         ProgressColor   =   -1
         ProgressColorEnd=   -1
         BackColorOrientation=   0
         ProgressColor   =   -1
         ProgressColorEnd=   -1
         ProgressColorOrientation=   0
         ProgressStyle   =   0
      EndProperty
      BeginProperty Header(3) {9EBAA93A-293D-44FA-9989-08F078763A1F} 
         Enabled         =   1
         KeepPosition    =   0
         Locked          =   0
         ImageHAlign     =   0
         ImageVAlign     =   0
         RemainUp        =   1
         Text            =   "Fourth"
         TextHAlign      =   0
         TextVAlign      =   0
         BackColor       =   -1
         ForeColor       =   -1
         SelectBackColor =   -1
         SelectForeColor =   -1
         BackColorDisabled=   -1
         ForeColorDisabled=   -1
         OverrideTheme   =   0
         Button          =   0
      EndProperty
      BeginProperty Footer(3) {9EBAA958-293D-44FA-9989-08F078763A1F} 
         Enabled         =   1
         KeepPosition    =   0
         ImageHAlign     =   0
         ImageVAlign     =   0
         RemainUp        =   0
         Text            =   ""
         TextHAlign      =   0
         TextVAlign      =   0
         BackColor       =   -1
         ForeColor       =   -1
         SelectBackColor =   -1
         SelectForeColor =   -1
         BackColorDisabled=   -1
         ForeColorDisabled=   -1
         OverrideTheme   =   0
         Button          =   0
      EndProperty
      BeginProperty Column(4) {9EBAA938-293D-44FA-9989-08F078763A1F} 
         BackColor       =   -1
         CellHAlign      =   0
         CellMultiline   =   0
         CellVAlign      =   0
         CellWordWrap    =   0
         ForeColor       =   -1
         Merge           =   0
         MergeInto       =   0
         MinWidth        =   0
         SelectBackColor =   -1
         SelectForeColor =   -1
         ToolTip         =   1
         Object.Width           =   83
         RealPos         =   4
         DispPos         =   4
         BackColorEnd    =   -1
         SelectBackColorEnd=   -1
         ProgressColor   =   -1
         ProgressColorEnd=   -1
         BackColorOrientation=   0
         ProgressColor   =   -1
         ProgressColorEnd=   -1
         ProgressColorOrientation=   0
         ProgressStyle   =   0
      EndProperty
      BeginProperty Header(4) {9EBAA93A-293D-44FA-9989-08F078763A1F} 
         Enabled         =   1
         KeepPosition    =   0
         Locked          =   0
         ImageHAlign     =   0
         ImageVAlign     =   0
         RemainUp        =   1
         Text            =   "Fifth"
         TextHAlign      =   0
         TextVAlign      =   0
         BackColor       =   -1
         ForeColor       =   -1
         SelectBackColor =   -1
         SelectForeColor =   -1
         BackColorDisabled=   -1
         ForeColorDisabled=   -1
         OverrideTheme   =   0
         Button          =   0
      EndProperty
      BeginProperty Footer(4) {9EBAA958-293D-44FA-9989-08F078763A1F} 
         Enabled         =   1
         KeepPosition    =   0
         ImageHAlign     =   0
         ImageVAlign     =   0
         RemainUp        =   0
         Text            =   ""
         TextHAlign      =   0
         TextVAlign      =   0
         BackColor       =   -1
         ForeColor       =   -1
         SelectBackColor =   -1
         SelectForeColor =   -1
         BackColorDisabled=   -1
         ForeColorDisabled=   -1
         OverrideTheme   =   0
         Button          =   0
      EndProperty
      SavedItemCount  =   0
      SavedColumnCount=   5
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Microsoft Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.TextBox Edit1 
      Enabled         =   0   'False
      Height          =   285
      Left            =   5520
      TabIndex        =   3
      Text            =   "Text1"
      Top             =   720
      Visible         =   0   'False
      Width           =   1335
   End
   Begin VB.Timer Timer1 
      Interval        =   100
      Left            =   5520
      Top             =   3600
   End
   Begin VB.CommandButton Command1 
      Cancel          =   -1  'True
      Caption         =   "Close"
      Height          =   375
      Left            =   5520
      TabIndex        =   1
      Top             =   120
      Width           =   1332
   End
   Begin VB.Label Label5 
      Caption         =   "Click on the SftTree/OCX control and hit F1 to access online help for SftTree/OCX 8.0"
      BeginProperty Font 
         Name            =   "Microsoft Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2415
      Left            =   5520
      TabIndex        =   2
      Top             =   4320
      Visible         =   0   'False
      Width           =   1335
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   0
      Left            =   5880
      Picture         =   "Form1.frx":05E4
      Top             =   1080
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   1
      Left            =   5880
      Picture         =   "Form1.frx":0866
      Top             =   1440
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   2
      Left            =   5880
      Picture         =   "Form1.frx":0AE8
      Top             =   1800
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   3
      Left            =   5880
      Picture         =   "Form1.frx":0D6A
      Top             =   2160
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   4
      Left            =   5880
      Picture         =   "Form1.frx":0FEC
      Top             =   2520
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   5
      Left            =   5880
      Picture         =   "Form1.frx":126E
      Top             =   2880
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   6
      Left            =   5880
      Picture         =   "Form1.frx":14F0
      Top             =   3240
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   7
      Left            =   5880
      Picture         =   "Form1.frx":1772
      Top             =   3600
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   8
      Left            =   6240
      Picture         =   "Form1.frx":19F4
      Top             =   1080
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   9
      Left            =   6240
      Picture         =   "Form1.frx":1C76
      Top             =   1440
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   10
      Left            =   6240
      Picture         =   "Form1.frx":1EF8
      Top             =   1800
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   11
      Left            =   6240
      Picture         =   "Form1.frx":217A
      Top             =   2160
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   12
      Left            =   6240
      Picture         =   "Form1.frx":23FC
      Top             =   2520
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   13
      Left            =   6240
      Picture         =   "Form1.frx":267E
      Top             =   2880
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   14
      Left            =   6240
      Picture         =   "Form1.frx":2900
      Top             =   3240
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Index           =   15
      Left            =   6240
      Picture         =   "Form1.frx":2B82
      Top             =   3600
      Visible         =   0   'False
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   240
      Index           =   9
      Left            =   5520
      Picture         =   "Form1.frx":2E04
      Top             =   3240
      Visible         =   0   'False
      Width           =   240
   End
   Begin VB.Image Image1 
      Height          =   240
      Index           =   8
      Left            =   5520
      Picture         =   "Form1.frx":2F06
      Top             =   3000
      Visible         =   0   'False
      Width           =   240
   End
   Begin VB.Image Image1 
      Height          =   240
      Index           =   7
      Left            =   5520
      Picture         =   "Form1.frx":3008
      Top             =   2760
      Visible         =   0   'False
      Width           =   240
   End
   Begin VB.Image Image1 
      Height          =   240
      Index           =   6
      Left            =   5520
      Picture         =   "Form1.frx":310A
      Top             =   2520
      Visible         =   0   'False
      Width           =   240
   End
   Begin VB.Image Image1 
      Height          =   240
      Index           =   5
      Left            =   5520
      Picture         =   "Form1.frx":320C
      Top             =   2280
      Visible         =   0   'False
      Width           =   240
   End
   Begin VB.Image Image1 
      Height          =   240
      Index           =   4
      Left            =   5520
      Picture         =   "Form1.frx":330E
      Top             =   2040
      Visible         =   0   'False
      Width           =   240
   End
   Begin VB.Image Image1 
      Height          =   240
      Index           =   3
      Left            =   5520
      Picture         =   "Form1.frx":3410
      Top             =   1800
      Visible         =   0   'False
      Width           =   240
   End
   Begin VB.Image Image1 
      Height          =   240
      Index           =   2
      Left            =   5520
      Picture         =   "Form1.frx":3512
      Top             =   1560
      Visible         =   0   'False
      Width           =   240
   End
   Begin VB.Image Image1 
      Height          =   240
      Index           =   1
      Left            =   5520
      Picture         =   "Form1.frx":3614
      Top             =   1320
      Visible         =   0   'False
      Width           =   240
   End
   Begin VB.Image Image1 
      Height          =   240
      Index           =   0
      Left            =   5520
      Picture         =   "Form1.frx":3716
      Top             =   1080
      Visible         =   0   'False
      Width           =   240
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Dim PicCount As Integer

Private Sub Command1_Click()
    End
End Sub

Private Sub Form_Load()
    PicCount = 0
    With SftTree1
        .VirtualMode = True
        .VirtualCount 10000000
        .VirtualImageSizes 16, 16, 16, 16, 16, 16, 16, 16
        ' Make columns and row headers optimal
        ' but do this at the end of the list, because our sample
        ' data is larger at the end
        .Items.TopIndex = .Items.Count - 1
        .ColumnsObj.MakeOptimal
        .RowHeaders.MakeOptimal
        .Items.RecalcHorizontalExtent
        .Items.TopIndex = 0
    End With
End Sub

Private Sub SftTree1_ItemClick(ByVal ItemIndex As Long, ByVal ColIndex As Integer, ByVal AreaType As Integer, ByVal Button As Integer, ByVal Shift As Integer)
    If AreaType = constSftTreeText Then
        SftTree1.Cell(ItemIndex, ColIndex).Edit 0, 0
    End If
End Sub

Private Sub SftTree1_ItemDblClick(ByVal ItemIndex As Long, ByVal ColIndex As Integer, ByVal AreaType As Integer, ByVal Button As Integer, ByVal Shift As Integer)
    If AreaType = constSftTreeColumnRes Then
        SftTree1.Column(ColIndex).MakeOptimal
    End If
End Sub

Private Sub SftTree1_VirtualItem(ByVal RowIndex As Long, ByVal ItemObject As VirtualItem)
    ItemObject.Item.Cell(0).Text = "Item " & RowIndex
    ItemObject.Item.Cell(1).Text = "Cell " & RowIndex
    ItemObject.Item.Cell(2).Text = "A"
    ItemObject.Item.Cell(3).Text = RowIndex Mod 7
    ItemObject.Item.Cell(4).Text = "Last " & RowIndex
    ItemObject.Item.RowHeader.Text = "R" & RowIndex
    ItemObject.Item.Enabled = ((RowIndex Mod 2) = 0)
    
    If RowIndex Mod 17 = 0 Then
        ItemObject.Item.RowHeader.Image.Picture = Image1(RowIndex Mod 10).Picture
    End If
    If RowIndex Mod 3 = 0 Then
        ItemObject.Item.Cell(1).ForeColor = vbRed
        ItemObject.Item.Cell(1).BackColor = vbWhite
    End If
    If RowIndex Mod 5 = 0 Then
        ItemObject.Item.Cell(1).Font.Bold = True
    End If
    If RowIndex Mod 7 = 0 Then
        Set ItemObject.Item.Image.Picture = Image1((RowIndex + 9) Mod 10).Picture
        Set ItemObject.Item.LabelImage.Picture = Image1((RowIndex + 1) Mod 10).Picture
    End If
    If RowIndex Mod 13 = 0 Then
        Set ItemObject.Item.RowHeader.Image.Picture = Image1((RowIndex + 5) Mod 10).Picture
    End If
    If RowIndex Mod 11 = 0 Then
        ItemObject.Item.RowHeader.ImageHAlign = halignSftTreeRight
    End If
    If RowIndex Mod 9 = 0 Then
        Set ItemObject.Item.Cell(1).Image.Picture = Image1((RowIndex + 3) Mod 10).Picture
    End If
    If RowIndex Mod 7 = 0 Then
        Set ItemObject.Item.Cell(0).Image.Picture = Image1((RowIndex + 2) Mod 10).Picture
        ItemObject.Item.Cell(0).ImageHAlign = halignSftTreeRight
    End If
End Sub

Private Sub Timer1_Timer()
    Set SftTree1.RowColumnHeader.Image.Picture = Image2(PicCount)
    PicCount = PicCount + 1
    If PicCount > 15 Then
        PicCount = 0
    End If
End Sub

Private Sub SftTree1_EditInitializing(Window As stdole.OLE_HANDLE, vData As Variant, ByVal EditIndex As Long, ByVal EditCol As Integer, LeftPix As stdole.OLE_XPOS_PIXELS, TopPix As stdole.OLE_YPOS_PIXELS, WidthPix As stdole.OLE_XSIZE_PIXELS, HeightPix As stdole.OLE_YSIZE_PIXELS)
    Timer1.Enabled = False ' stop the spinning globe
    
    Dim TextHeight As Integer
    ' LeftPix/TopPix/WidthPix/HeightPix describes the current cell area
    ' we need to return the position and size needed for editing.
    ' In this example, we use the height of the control on the form
    ' and center it over the cell.
    TextHeight = Edit1.Height / Screen.TwipsPerPixelX
    TopPix = TopPix + (HeightPix - TextHeight) / 2
    HeightPix = TextHeight

    ' Set the text in the control used for cell editing and
    ' set other control-specific properties
    Edit1.Text = SftTree1.Cell(EditIndex, EditCol).Text
    Edit1.SelStart = 0
    Edit1.SelLength = 999

    ' Return the control's window handle
    Window = Edit1.hWnd

    ' Define navigation keys
    ' VK_TAB
    SftTree1.CellEditIntercept Asc(vbTab), cellEditInterceptSftTreeChar + cellEditInterceptSftTreeControlChar + cellEditInterceptSftTreeShiftChar
    ' VK_RETURN
    SftTree1.CellEditIntercept Asc(vbCr), cellEditInterceptSftTreeChar + cellEditInterceptSftTreeControlChar + cellEditInterceptSftTreeShiftChar
    ' VK_HOME
    SftTree1.CellEditIntercept 36, cellEditInterceptSftTreeControlChar
    ' VK_END
    SftTree1.CellEditIntercept 35, cellEditInterceptSftTreeControlChar
    ' VK_UP
    SftTree1.CellEditIntercept 38, cellEditInterceptSftTreeChar + cellEditInterceptSftTreeControlChar + cellEditInterceptSftTreeShiftChar
    ' VK_DOWN
    SftTree1.CellEditIntercept 40, cellEditInterceptSftTreeChar + cellEditInterceptSftTreeControlChar + cellEditInterceptSftTreeShiftChar
End Sub

Private Sub SftTree1_EditNavigating(ByVal Key As Long, ByVal Shift As Integer, ByVal ItemIndex As Long, ByVal ColIndex As Integer)
    ' Process key pressed
    SftTree1.EditNavigate Key, Shift
End Sub

Private Sub SftTree1_EditValidate(ByVal Window As stdole.OLE_HANDLE, ByVal vData As Variant, ByVal EditIndex As Long, ByVal EditCol As Integer, InputValid As Boolean)
    If Edit1.Text <> SftTree1.Cell(EditIndex, EditCol).Text Then
        MsgBox ("This example doesn't preserve the changes you make, " & _
        "because the sample data is randomly generated.")
    End If
End Sub

Private Sub SftTree1_EditEnded(ByVal Accepted As Boolean, ByVal ItemIndex As Long, ByVal ColIndex As Integer)
    Timer1.Enabled = True ' restart the spinning globe
End Sub


Last Updated 05/24/2026 - (email)
© 2026 Softel vdm, Inc.