HeaderPane
Main
Hide

SftTree/OCX 8.0 - ActiveX Tree Control

Share Link
Print

CellEditingII Sample (VB6)

This sample illustrates cell editing using ActiveX controls.

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

VERSION 5.00
Object = "{04048830-2BE4-4868-8CDC-B8E6FC7815C5}#7.5#0"; "SftTree_IX86_U_80.ocx"
Object = "{86E033FE-C5C7-4FAB-9D2A-831FD5089954}#8.0#0"; "SftMask_IX86_U_80.ocx"
Object = "{6B36D32E-6FFF-4280-984B-62777A812EAA}#6.0#0"; "SftBox_IX86_U_60.ocx"
Begin VB.Form Form1 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Softel vdm, Inc. - CellEditingII Sample"
   ClientHeight    =   7485
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   8865
   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
   ScaleHeight     =   7485
   ScaleWidth      =   8865
   StartUpPosition =   3  'Windows Default
   Begin SftTreeLib80.SftTree SftTree1 
      Height          =   4095
      Left            =   120
      TabIndex        =   0
      Top             =   480
      Width           =   7335
      PropVer         =   75
      xcx             =   12938
      xcy             =   7223
      PropFile        =   ""
      PropDesignTime  =   1
      DeletePropFile  =   0
      IntVal          =   55
      xBfStyle1       =   64044624
      xBfStyle2       =   1708900927
      xBfStyle3       =   1661633535
      xBfStyle4       =   -1930068975
      FlatProperties  =   0
      Appearance      =   1
      AutoRespond     =   -842150451
      BackgroundStyle =   2
      BackgroundX     =   0
      BackgroundY     =   0
      BorderStyle     =   0
      ButtonStyle     =   2
      CellEventHandling=   0
      CellEditStyle   =   0
      CellEditLimit   =   0
      ColumnCount     =   3
      CopyItemDataString=   1
      CustomCode      =   0
      DragImage       =   -842150451
      DragMethod      =   1
      DragType        =   3
      Enabled         =   1
      HandleReturn    =   -842150451
      MousePointer    =   0
      LeftButtonOnly  =   1
      LeftItemClickOnly=   1
      OLEDropMode     =   0
      RightToLeft     =   0
      UseThemes       =   -1  'True
      Scrollbars      =   3
      ScrollbarStyle  =   0
      ShowTruncated   =   1
      VAlignStyle     =   0
      VirtualMode     =   0
      WebLicense      =   ""
      SmoothScroll    =   1
      ButtonAppearance=   8
      MouseOverTransitionEffect=   0
      EdgeVerticalColor=   -1
      EdgeHorizontalColor=   -1
      BeginProperty ItemEditFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS 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  =   1
         OpenEnded       =   1
         OpenEnded2      =   1
      EndProperty
      BeginProperty Headers {9EBAA936-293D-44FA-9989-08F078763A1F} 
         Appearance      =   1
         BackColor       =   -2147483633
         ForeColor       =   -2147483630
         GrayedColor     =   -2147483631
         HilightColor    =   -2147483628
         Multiline       =   1
         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       =   0
         CalcVisibleOnly =   0
         Cell3D          =   0
         CharSearchColumn=   -1
         CharSearchMode  =   1
         DropHighlightColor=   -2147483635
         DropHighlightStyle=   1
         EditNoFocusStyle=   2
         FlybyHighlight  =   1
         ForeColor       =   -2147483640
         ForeColorOdd    =   -2147483640
         GrayedColor     =   -2147483631
         GridHorizontalColor=   -2147483632
         GridStyle       =   6
         GridVerticalColor=   -2147483632
         HilightColor    =   -2147483628
         HorizontalExtentPix=   0
         HorizontalExtent2Pix=   0
         HorizontalOffsetPix=   0
         HorizontalOffset2Pix=   0
         Indentation     =   -1
         ItemImageAlign  =   1
         Lines           =   2
         MaxHeightPix    =   0
         MinHeightPix    =   0
         MultiSelect     =   0
         NoFocusStyle    =   0
         NoSelection     =   0
         RubberbandSelection=   1
         SelectBackColor =   -2147483635
         SelectBackColorNoFocus=   -2147483633
         SelectForeColor =   -2147483634
         SelectForeColorNoFocus=   -2147483630
         ShadowColor     =   -2147483632
         Style           =   1
         ScrollTips      =   1
         SelectionArea   =   1
         SelectStyle     =   2
         ShowFocusRectangle=   1
         ToolTipAlways   =   0
         ToolTipBackColor=   -1
         ToolTipForeColor=   -1
         ToolTipsUseEntireCell=   0
         TopIndex        =   0
         TreeLineColor   =   -2147483631
         TreeLineGrayedColor=   -2147483631
         TreeLineStyle   =   3
         UpdateCurrentExpandCollapse=   0
         OutlineStyle    =   1
         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":0000
            Appearance      =   -1
            FrameColor      =   -1
            SampleColor     =   -1
         EndProperty
         BeginProperty ItemImageExpanded {980702E2-0AB6-41B1-9B85-F8755A697255} 
            Object.Height          =   0
            Object.Width           =   0
            Picture         =   "Form1.frx":0552
            Appearance      =   -1
            FrameColor      =   -1
            SampleColor     =   -1
         EndProperty
         BeginProperty ItemImageLeaf {980702E2-0AB6-41B1-9B85-F8755A697255} 
            Object.Height          =   0
            Object.Width           =   0
            Picture         =   "Form1.frx":0AA4
            Appearance      =   -1
            FrameColor      =   -1
            SampleColor     =   -1
         EndProperty
      EndProperty
      BeginProperty RowColumnHeader {9EBAA942-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
         BeginProperty Image {980702E2-0AB6-41B1-9B85-F8755A697255} 
            Object.Height          =   0
            Object.Width           =   0
            Picture         =   "Form1.frx":0FF6
            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           =   40
         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   =   1
         CellVAlign      =   0
         CellWordWrap    =   0
         ForeColor       =   -1
         Merge           =   0
         MergeInto       =   0
         MinWidth        =   0
         SelectBackColor =   -1
         SelectForeColor =   -1
         ToolTip         =   1
         Object.Width           =   100
         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            =   "First Column"
         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   =   1
         CellVAlign      =   0
         CellWordWrap    =   0
         ForeColor       =   -1
         Merge           =   0
         MergeInto       =   0
         MinWidth        =   0
         SelectBackColor =   -1
         SelectForeColor =   -1
         ToolTip         =   1
         Object.Width           =   100
         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   =   1
         CellVAlign      =   0
         CellWordWrap    =   0
         ForeColor       =   -1
         Merge           =   0
         MergeInto       =   0
         MinWidth        =   0
         SelectBackColor =   -1
         SelectForeColor =   -1
         ToolTip         =   1
         Object.Width           =   100
         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 Column"
         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
      SavedItemCount  =   0
      SavedColumnCount=   3
      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 SftBoxLib60.SftBox SftBox1 
      Height          =   315
      Left            =   5880
      TabIndex        =   4
      Top             =   6600
      Visible         =   0   'False
      Width           =   3015
      PropVer         =   50
      PropFile        =   ""
      PropDesignTime  =   1
      DeletePropFile  =   0
      IntVal          =   -842150451
      xBfStyle1       =   64044624
      xBfStyle2       =   1708916831
      xBfStyle3       =   1661653535
      xBfStyle4       =   -1930088975
      FlatProperties  =   0   'False
      xcx             =   5318
      xcy             =   556
      Appearance      =   1
      BorderStyle     =   0
      ColumnCount     =   2
      ControlAlign    =   0
      Enabled         =   0
      ExtendedUI      =   0
      FlatProperties  =   0
      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
      GridStyle       =   6
      MousePointer    =   0
      OLEDragMode     =   0
      OLEDropMode     =   0
      Scrollbars      =   6
      Style           =   1
      UseThemes       =   -1  'True
      RightToLeft     =   0
      ToolTipBackColor=   -1
      ToolTipForeColor=   -1
      ScrollTips      =   1
      CustomCode      =   0
      AutoRespond     =   0
      ButtonStyle     =   0
      SmoothScroll    =   1
      VAlignStyle     =   0
      WebLicense      =   ""
      AlignSelection  =   1
      MouseOverTransitionEffect=   0
      BeginProperty Column(0) {C5F14F59-FA60-40B9-9109-609D83030E40} 
         PropVer         =   0
         BackColor       =   -1
         ForeColor       =   -1
         SelectBackColor =   -1
         SelectForeColor =   -1
         CellAlign       =   0
         Multiline       =   0
         MinWidth        =   0
         WidthCol        =   100
         ToolTip         =   1
         RealPos         =   0
         DispPos         =   0
         Data            =   0
         Merge           =   0
         MergeInto       =   0
      EndProperty
      BeginProperty Header(0) {C5F14F63-FA60-40B9-9109-609D83030E40} 
         PropVer         =   0
         Object.Align           =   0
         Enabled         =   1
         RemainUp        =   1
         Flag            =   0
         PictureAlign    =   2
         Text            =   "Available Selections"
         ToolTip         =   ""
         ImageVAlign     =   0
         TextVAlign      =   0
      EndProperty
      BeginProperty Column(1) {C5F14F59-FA60-40B9-9109-609D83030E40} 
         PropVer         =   0
         BackColor       =   -1
         ForeColor       =   -1
         SelectBackColor =   -1
         SelectForeColor =   -1
         CellAlign       =   0
         Multiline       =   0
         MinWidth        =   0
         WidthCol        =   100
         ToolTip         =   1
         RealPos         =   1
         DispPos         =   1
         Data            =   0
         Merge           =   0
         MergeInto       =   0
      EndProperty
      BeginProperty Header(1) {C5F14F63-FA60-40B9-9109-609D83030E40} 
         PropVer         =   0
         Object.Align           =   0
         Enabled         =   1
         RemainUp        =   1
         Flag            =   0
         PictureAlign    =   2
         Text            =   "Description"
         ToolTip         =   ""
         ImageVAlign     =   0
         TextVAlign      =   0
      EndProperty
      BeginProperty DropDown {C5F14F5F-FA60-40B9-9109-609D83030E40} 
         PropVer         =   0
         DropOnInput     =   1
         DropOnFocus     =   0
         ProcessClick    =   0
         Style           =   0
         HeightDrop      =   6
         WidthDrop       =   -100
         BackColor       =   -1
         BlackEdgeColor  =   -2147483627
         DarkEdgeColor   =   -2147483632
         ForeColor       =   -2147483630
         GrayedColor     =   -2147483631
         LightEdgeColor  =   -2147483626
         WhiteEdgeColor  =   -2147483628
         ButtonStyle     =   0
         SizeBox         =   1
         HoverButton     =   1
         SearchMode      =   3
         SearchColumn    =   -1
         OptimalWidth    =   1
      EndProperty
      BeginProperty Edit {C5F14F61-FA60-40B9-9109-609D83030E40} 
         PropVer         =   0
         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
         Limit           =   0
         Locked          =   0
         SearchMode      =   -842150451
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         TextHAlign      =   0
      EndProperty
      BeginProperty Headers {C5F14F61-FA60-40B9-9109-609D83030E40} 
         PropVer         =   0
         Style           =   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
         Resizable       =   1
         Reorderable     =   1
         BackColor       =   -2147483633
         DarkEdgeColor   =   -2147483632
         ForeColor       =   -2147483630
         GrayedColor     =   -2147483631
         LightEdgeColor  =   -2147483628
         Main            =   0
         DropDown        =   1
      EndProperty
      BeginProperty Items {C5F14F65-FA60-40B9-9109-609D83030E40} 
         PropVer         =   0
         Appearance      =   0
         CursorSelect    =   0
         DeleteEvent     =   0
         DropHighlightStyle=   0
         InheritBackColor=   1
         Lines           =   1
         SelectionStyle  =   2
         Style           =   0
         TreeLineStyle   =   0
         BackColor       =   -2147483643
         BackColorOdd    =   -2147483643
         DropHighlightColor=   -2147483635
         ForeColor       =   -2147483640
         ForeColorOdd    =   -2147483640
         GrayedColor     =   -2147483631
         GridHorizontalColor=   -2147483632
         GridVerticalColor=   -2147483632
         HilightColor    =   -2147483628
         SelectBackColor =   -2147483635
         SelectForeColor =   -2147483634
         ShadowColor     =   -2147483632
         TreeLineColor   =   -2147483640
         TreeLineGrayedColor=   -2147483631
         SelectBackColorNoFocus=   -2147483635
         SelectForeColorNoFocus=   -2147483634
         NoFocusStyle    =   2
         FlybyHighlight  =   1
         HorizontalExtent=   0
         HorizontalOffset=   0
         DropIndex       =   -1
         Selection       =   -1
         Object.Top             =   0
         Indentation     =   -1
         OutlineStyle    =   1
         SelectOutlineBorderColor=   16760576
         SelectInnerBorderColor=   15921352
         SelectInnerFill1=   16777215
         SelectInnerFill2=   15128749
         SelectHotOutlineBorderColor=   16760576
         SelectHotInnerBorderColor=   15987684
         SelectHotInnerFill1=   16777215
         SelectHotInnerFill2=   14337411
         SelectNoFocusOutlineBorderColor=   16760576
         SelectNoFocusInnerBorderColor=   15987684
         SelectNoFocusInnerFill1=   16777215
         SelectNoFocusInnerFill2=   14337411
         HotOutlineBorderColor=   15392443
         HotInnerBorderColor=   15987684
         HotInnerFill1   =   16777215
         HotInnerFill2   =   15722443
         DropTargetOutlineBorderColor=   5863929
         DropTargetInnerBorderColor=   15458494
         DropTargetInnerFill1=   16777215
         DropTargetInnerFill2=   14337411
         MaxHeightPix    =   0
         MinHeightPix    =   0
         SelectEnabledItemsOnly=   0
      EndProperty
      BeginProperty RowHeaders {C5F14F67-FA60-40B9-9109-609D83030E40} 
         PropVer         =   0
         Object.Align           =   0
         Enabled         =   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
         RemainUp        =   1
         Style           =   0
         WidthHdr        =   0
         BackColor       =   -2147483633
         DarkEdgeColor   =   -2147483632
         ForeColor       =   -2147483630
         GrayedColor     =   -2147483631
         LightEdgeColor  =   -2147483628
         SelectBackColor =   -2147483633
         SelectForeColor =   -2147483630
         Lines           =   1
         TextVAlign      =   0
      EndProperty
      BeginProperty RowColumnHeader {C5F14F6D-FA60-40B9-9109-609D83030E40} 
         PropVer         =   0
         Object.Align           =   0
         Enabled         =   1
         RemainUp        =   1
         PictureAlign    =   2
         Text            =   ""
         BackColor       =   -2147483633
         DarkEdgeColor   =   -2147483632
         ForeColor       =   -2147483630
         GrayedColor     =   -2147483631
         LightEdgeColor  =   -2147483628
         Down            =   0   'False
         ImageVAlign     =   0
         TextVAlign      =   0
         ButtonDown      =   0
      EndProperty
      BeginProperty Columns {C5F14F6B-FA60-40B9-9109-609D83030E40} 
         PropVer         =   0
         OpenEnded       =   1
      EndProperty
      SavedItemCount  =   0
      SavedColumnCount=   2
      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 SftMaskLib80.SftMask SftMaskDateTime 
      Height          =   285
      Left            =   6240
      TabIndex        =   5
      Top             =   6960
      Visible         =   0   'False
      Width           =   2655
      PropVer         =   70
      xcx             =   4683
      xcy             =   503
      PropFile        =   ""
      PropDesignTime  =   1
      DeletePropFile  =   0
      IntVal          =   55
      xBfStyle1       =   64044624
      xBfStyle2       =   1708926831
      xBfStyle3       =   1661663519
      xBfStyle4       =   -1930098975
      FlatProperties  =   0   'False
      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
      FormattedText   =   ""
      Mask            =   "$D"
      PromptChar      =   " "
      PswdChar        =   ""
      Text            =   ""
      DataMember      =   ""
      DataField       =   ""
      Alignment       =   0
      Appearance      =   1
      AutoAdvance     =   -1  'True
      AutoSize        =   -1  'True
      AutoTab         =   0   'False
      BorderStyle     =   1
      ClipMode        =   0
      EditStyle       =   2
      Enabled         =   1
      FlatProperties  =   0
      HideSelection   =   1
      MaxLength       =   64
      MousePointer    =   0
      OLEDragMode     =   0
      OLEDropMode     =   0
      PromptUnderline =   -1  'True
      RightToLeft     =   0
      TabAdvance      =   -1  'True
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      ForeColorGrayed =   -2147483631
      MaskForeColor   =   -2147483640
      MaskForeColorGrayed=   -2147483631
      SelectBackColor =   -2147483635
      SelectForeColor =   -2147483634
      CalcFracDigits  =   2
      CalcBackColor   =   -2147483643
      CalcForeColor   =   -2147483640
      CalcSelectBackColor=   -2147483635
      CalcSelectForeColor=   -2147483634
      CalCircleToday  =   -1  'True
      CalFirstDay     =   0
      CalFirstDate    =   2
      CalLastDate     =   100000
      CalShowToday    =   -1  'True
      CalWeekNumbers  =   0   'False
      CalBackColor    =   -2147483633
      CalMonthBackColor=   -2147483643
      CalMonthForeColor=   -2147483640
      CalOtherForeColor=   -2147483631
      CalTitleBackColor=   -2147483646
      CalTitleForeColor=   -2147483639
      DataAccess      =   3
      UseThemes       =   -1  'True
      HotTrack        =   -1  'True
      EntrySelect     =   1
      InputMode       =   1
      Locked          =   0   'False
      Insert          =   -1  'True
      MessageEmpty    =   ""
      MessageInvalid  =   ""
      MessageTitle    =   ""
      PromptUnderlineNoFocus=   0   'False
      CalCenturyBreak =   -1
      AllowEmpty      =   0   'False
      Padding         =   0   'False
      TabAdvanceLast  =   -1  'True
      CalcLines       =   12
      EntrySelectMouse=   0   'False
      ThemeStyle      =   0
      CalcColorFrame  =   -2147483642
      CalcColorTotalBg=   -2147483643
      CalcColorTotalFg=   -2147483640
      DropDownWidth   =   0
      CalDropOnFocus  =   0   'False
      CalSingleClickClose=   0   'False
      LockedUpDown    =   0   'False
      LockedDropDown  =   0   'False
      AllowF4         =   0   'False
      BackColorInvalid=   -1
      ForeColorInvalid=   -1
      LockedEllipse   =   0   'False
      DefaultText     =   ""
      DefaultHandling =   1
      WebLicense      =   ""
      BackColorFocus  =   -1
      ForeColorFocus  =   -1
      SelectBackColorFocus=   -1
      SelectForeColorFocus=   -1
      ViewCalcLines   =   0
      IgnoreNumMinMax =   0   'False
      Label           =   ""
      LabelPosition   =   0
      ErrorPosition   =   1
      ErrorHandling   =   0
      AllowEmptyWithoutMask=   -1  'True
      MessageRequired =   ""
      BeginProperty Caption {3BB1470D-AC40-4737-B5A6-920366D254FE} 
         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
         Text            =   "Caption:"
         Alignment       =   0
         Position        =   0
         SizePercent     =   0
         VerticalAlignment=   1
         BackColor       =   -2147483633
         ForeColor       =   -2147483630
         ForeColorGrayed =   -2147483631
         Transparent     =   0   'False
         WidthPix        =   0
      EndProperty
      BeginProperty AutoComplete {3BB14711-AC40-4737-B5A6-920366D254FE} 
         File            =   ""
         Encrypt         =   -1  'True
         IgnoreCase      =   -1  'True
         Mode            =   1
         MaxEntries      =   50
         OptimalHeight   =   0   'False
         ShowOne         =   -1  'True
         MaxShown        =   20
         DefaultDirectory=   ""
         Contents        =   0
      EndProperty
   End
   Begin SftMaskLib80.SftMask SftMaskAmount 
      Height          =   285
      Left            =   6240
      TabIndex        =   3
      Top             =   6240
      Visible         =   0   'False
      Width           =   2655
      PropVer         =   70
      xcx             =   4683
      xcy             =   503
      PropFile        =   ""
      PropDesignTime  =   1
      DeletePropFile  =   0
      IntVal          =   55
      xBfStyle1       =   64044624
      xBfStyle2       =   1708926831
      xBfStyle3       =   1661663519
      xBfStyle4       =   -1930098975
      FlatProperties  =   0   'False
      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
      FormattedText   =   ""
      Mask            =   "$^C-,8.2"
      PromptChar      =   " "
      PswdChar        =   ""
      Text            =   ""
      DataMember      =   ""
      DataField       =   ""
      Alignment       =   2
      Appearance      =   1
      AutoAdvance     =   -1  'True
      AutoSize        =   -1  'True
      AutoTab         =   0   'False
      BorderStyle     =   1
      ClipMode        =   0
      EditStyle       =   1
      Enabled         =   1
      FlatProperties  =   0
      HideSelection   =   1
      MaxLength       =   64
      MousePointer    =   0
      OLEDragMode     =   0
      OLEDropMode     =   0
      PromptUnderline =   -1  'True
      RightToLeft     =   0
      TabAdvance      =   0   'False
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      ForeColorGrayed =   -2147483631
      MaskForeColor   =   -2147483640
      MaskForeColorGrayed=   -2147483631
      SelectBackColor =   -2147483635
      SelectForeColor =   -2147483634
      CalcFracDigits  =   2
      CalcBackColor   =   -2147483643
      CalcForeColor   =   -2147483640
      CalcSelectBackColor=   -2147483635
      CalcSelectForeColor=   -2147483634
      CalCircleToday  =   -1  'True
      CalFirstDay     =   0
      CalFirstDate    =   2
      CalLastDate     =   100000
      CalShowToday    =   -1  'True
      CalWeekNumbers  =   0   'False
      CalBackColor    =   -2147483633
      CalMonthBackColor=   -2147483643
      CalMonthForeColor=   -2147483640
      CalOtherForeColor=   -2147483631
      CalTitleBackColor=   -2147483646
      CalTitleForeColor=   -2147483639
      DataAccess      =   3
      UseThemes       =   -1  'True
      HotTrack        =   -1  'True
      EntrySelect     =   2
      InputMode       =   1
      Locked          =   0   'False
      Insert          =   -1  'True
      MessageEmpty    =   ""
      MessageInvalid  =   ""
      MessageTitle    =   ""
      PromptUnderlineNoFocus=   0   'False
      CalCenturyBreak =   -1
      AllowEmpty      =   0   'False
      Padding         =   -1  'True
      TabAdvanceLast  =   -1  'True
      CalcLines       =   12
      EntrySelectMouse=   0   'False
      ThemeStyle      =   0
      CalcColorFrame  =   -2147483642
      CalcColorTotalBg=   -2147483643
      CalcColorTotalFg=   -2147483640
      DropDownWidth   =   0
      CalDropOnFocus  =   0   'False
      CalSingleClickClose=   0   'False
      LockedUpDown    =   0   'False
      LockedDropDown  =   0   'False
      AllowF4         =   0   'False
      BackColorInvalid=   -1
      ForeColorInvalid=   -1
      LockedEllipse   =   0   'False
      DefaultText     =   ""
      DefaultHandling =   1
      WebLicense      =   ""
      BackColorFocus  =   -1
      ForeColorFocus  =   -1
      SelectBackColorFocus=   -1
      SelectForeColorFocus=   -1
      ViewCalcLines   =   0
      IgnoreNumMinMax =   0   'False
      Label           =   ""
      LabelPosition   =   0
      ErrorPosition   =   1
      ErrorHandling   =   0
      AllowEmptyWithoutMask=   -1  'True
      MessageRequired =   ""
      BeginProperty Caption {3BB1470D-AC40-4737-B5A6-920366D254FE} 
         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
         Text            =   "Caption:"
         Alignment       =   0
         Position        =   0
         SizePercent     =   0
         VerticalAlignment=   1
         BackColor       =   -2147483633
         ForeColor       =   -2147483630
         ForeColorGrayed =   -2147483631
         Transparent     =   0   'False
         WidthPix        =   0
      EndProperty
      BeginProperty AutoComplete {3BB14711-AC40-4737-B5A6-920366D254FE} 
         File            =   ""
         Encrypt         =   -1  'True
         IgnoreCase      =   -1  'True
         Mode            =   1
         MaxEntries      =   50
         OptimalHeight   =   0   'False
         ShowOne         =   -1  'True
         MaxShown        =   20
         DefaultDirectory=   ""
         Contents        =   0
      EndProperty
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H8000000F&
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "Microsoft Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2655
      Left            =   120
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      TabIndex        =   6
      TabStop         =   0   'False
      Text            =   "Form1.frx":14CC
      Top             =   4680
      Width           =   7335
   End
   Begin VB.CommandButton Command1 
      Cancel          =   -1  'True
      Caption         =   "Close"
      Height          =   375
      Left            =   7560
      TabIndex        =   1
      Top             =   120
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "Cell Editing with separately available ActiveX controls."
      Height          =   375
      Left            =   120
      TabIndex        =   2
      Top             =   120
      Width           =   7335
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Private Sub Command1_Click()
    End
End Sub

Private Sub Form_Load()
    Dim ItemIndex As Integer
    Dim Dt As Date
    Dim S As String
    
    Text1.Text = "In this example, the first column uses a SftMask/OCX Masked Edit control " & _
      "to enter an amount.  Try entering a new amount, then type + or - to access the built-in " & _
      "popup calculator." & vbCr & vbLf & vbCr & vbLf & _
      "The second column uses a SftBox/OCX Combo Box control." & vbCr & vbLf & vbCr & vbLf & _
      "The last column again uses a SftMask/OCX Masked Edit control to enter a date.  Click on the " & _
      "drop down button to access the popup calendar."
      
    ItemIndex = SftTree1.Items.Add("Edit cells" & vbCr & vbLf & "using SftMask/OCX:")
    SftTree1.Item(ItemIndex).EditIgnore = True
    SftTree1.Cell(ItemIndex, 1).Text = vbCr & vbLf & "using SftBox/OCX:"
    SftTree1.Cell(ItemIndex, 2).Text = "and again" & vbCr & vbLf & "using SftMask/OCX:"
    
    ItemIndex = SftTree1.Items.Add("5.33")
    SftTree1.Cell(ItemIndex, 0).TextHAlign = halignSftTreeDefaultRight
    SftTree1.Cell(ItemIndex, 1).Text = "Option 1"
    Dt = Date - 1
    S = "short"
    SftMaskDateTime.Calendar.FormatDate Dt, S
    SftTree1.Cell(ItemIndex, 2).Text = S
    SftTree1.Cell(ItemIndex, 2).DataTag = Dt
    
    ItemIndex = SftTree1.Items.Add("122.33")
    SftTree1.Cell(ItemIndex, 0).TextHAlign = halignSftTreeDefaultRight
    SftTree1.Cell(ItemIndex, 1).Text = "Option 3"
    Dt = Date
    S = "short"
    SftMaskDateTime.Calendar.FormatDate Dt, S
    SftTree1.Cell(ItemIndex, 2).Text = S
    SftTree1.Cell(ItemIndex, 2).DataTag = Dt
    
    ItemIndex = SftTree1.Items.Add("66.05")
    SftTree1.Cell(ItemIndex, 0).TextHAlign = halignSftTreeDefaultRight
    SftTree1.Cell(ItemIndex, 1).Text = "Option 2"
    Dt = Date + 1
    S = "short"
    SftMaskDateTime.Calendar.FormatDate Dt, S
    SftTree1.Cell(ItemIndex, 2).Text = S
    SftTree1.Cell(ItemIndex, 2).DataTag = Dt
        
    SftTree1.ColumnsObj.MakeOptimal
    SftTree1.RowHeaders.MakeOptimal
    SftTree1.Items.RecalcHorizontalExtent

    SftTree1.Item(0).Selected = True
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)
    ' User clicked on a cell
    If AreaType = constSftTreeCellText Then
        SftTree1.Cell(ItemIndex, ColIndex).Edit 0, 0
    End If
End Sub

Private Sub SftTree1_EditAllowed(ByVal ItemIndex As Long, ByVal ColIndex As Integer, Allowed As Boolean)
    ' Last chance to suppress cell editing for a cell
    'If ItemIndex = 1 And ColIndex = 1 Then
    '    Allowed = False
    '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)
    Dim ctrl As Control
    
    ' Choose a control based on current column being edited
    If EditCol = 0 Then
        Set ctrl = SftMaskAmount
    ElseIf EditCol = 1 Then
        Set ctrl = SftBox1
    Else
        Set ctrl = SftMaskDateTime
    End If

    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 = ctrl.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
    If ctrl Is SftMaskAmount Then
        SftMaskAmount.Text = SftTree1.Cell(EditIndex, EditCol).Text
        SftMaskAmount.SelStart = 0
        SftMaskAmount.SelLength = 999
    ElseIf ctrl Is SftMaskDateTime Then
        SftMaskDateTime.Contents.DateTime = SftTree1.Cell(EditIndex, EditCol).DataTag
    Else
        SftBox1.Items.Clear
        Dim ItemIndex As Long
        ItemIndex = SftBox1.Items.Add("Option 1")
         SftBox1.Cell(ItemIndex, 1).Text = "Description for option 1"
        ItemIndex = SftBox1.Items.Add("Option 2")
         SftBox1.Cell(ItemIndex, 1).Text = "Description for option 2"
        ItemIndex = SftBox1.Items.Add("Option 3")
         SftBox1.Cell(ItemIndex, 1).Text = "Description for option 3"
        Dim S As String
        S = SftTree1.Cell(EditIndex, EditCol).Text
        If SftBox1.Items.Find(S, 0, 0, False, True, True) < 0 Then
            ItemIndex = SftBox1.Items.Add(S)
             SftBox1.Cell(ItemIndex, 1).Text = "Description for " & S
        End If
        SftBox1.Columns.MakeOptimal 0
        SftBox1.RecalcHorizontalExtent 0
        SftBox1.Edit.Text = SftTree1.Cell(EditIndex, EditCol).Text
    End If

    ' Return the control's window handle
    Window = ctrl.Window

    ' 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
    
    If ctrl Is SftMaskAmount Then
        ' We want these keys just for the amount edit control.
        ' VK_UP
        SftTree1.CellEditIntercept 38, cellEditInterceptSftTreeChar + cellEditInterceptSftTreeControlChar + cellEditInterceptSftTreeShiftChar
        ' VK_DOWN
        SftTree1.CellEditIntercept 40, cellEditInterceptSftTreeChar + cellEditInterceptSftTreeControlChar + cellEditInterceptSftTreeShiftChar
    End If
End Sub

Private Sub SftTree1_EditInitialized(ByVal Window As stdole.OLE_HANDLE, ByVal vData As Variant, ByVal EditIndex As Long, ByVal EditCol As Integer, ByVal ParentWindow As stdole.OLE_HANDLE, ByVal LeftPix As Long, ByVal TopPix As Long, ByVal WidthPix As Long, ByVal HeightPix As Long, Positioned As Boolean)
    ' We position the control (ActiveX controls must be positioned using the EditInitialized event)
    Positioned = True
    
    If Window = SftMaskAmount.hWnd Then
        SftMaskAmount.Left = LeftPix * Screen.TwipsPerPixelX
        SftMaskAmount.Top = TopPix * Screen.TwipsPerPixelY
        SftMaskAmount.Width = WidthPix * Screen.TwipsPerPixelX
        SftMaskAmount.Height = HeightPix * Screen.TwipsPerPixelY
        SftMaskAmount.Enabled = True
        SftMaskAmount.Visible = True
        SftMaskAmount.SetFocus
    ElseIf Window = SftMaskDateTime.hWnd Then
        SftMaskDateTime.Left = LeftPix * Screen.TwipsPerPixelX
        SftMaskDateTime.Top = TopPix * Screen.TwipsPerPixelY
        SftMaskDateTime.Width = WidthPix * Screen.TwipsPerPixelX
        SftMaskDateTime.Height = HeightPix * Screen.TwipsPerPixelY
        SftMaskDateTime.Enabled = True
        SftMaskDateTime.Visible = True
        SftMaskDateTime.SetFocus
    Else
        SftBox1.Left = LeftPix * Screen.TwipsPerPixelX
        SftBox1.Top = TopPix * Screen.TwipsPerPixelY
        SftBox1.Width = WidthPix * Screen.TwipsPerPixelX
        SftBox1.Height = HeightPix * Screen.TwipsPerPixelY
        SftBox1.Enabled = True
        SftBox1.Visible = True
        SftBox1.SetFocus
        SftBox1.Edit.SetSelection 0, -1
        SftBox1.DropDown.Dropped = True
    End If
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)
    ' Validate the new cell contents
    Dim S As String
    If Window = SftMaskAmount.hWnd Then
        If Not SftMaskAmount.Contents.Valid Then
            ' could validate
        End If
        S = SftMaskAmount.TextDisplay
    ElseIf Window = SftMaskDateTime.hWnd Then
        If Not SftMaskDateTime.Contents.Valid Then
            MsgBox ("Please enter a valid date.")
            InputValid = False
            Exit Sub
        End If
        S = SftMaskDateTime.TextDisplay
    Else
        S = SftBox1.Edit.Text
    End If
    S = Trim(S)
    If Len(S) <= 0 Then
        MsgBox ("Just to demonstrate data input validation, this example rejects empty cells.  Please enter some data.")
        InputValid = False
    End If
End Sub

Private Sub SftTree1_EditEnding(ByVal Window As stdole.OLE_HANDLE, ByVal vData As Variant, ByVal EditIndex As Long, ByVal EditCol As Integer, ByVal SaveInput As Boolean)
    ' Save the new cell contents
    If Window = SftMaskAmount.hWnd Then
        SftMaskAmount.Visible = False
        SftMaskAmount.Enabled = False
        If SaveInput Then
            SftTree1.Cell(EditIndex, EditCol).Text = SftMaskAmount.TextDisplay
        End If
    ElseIf Window = SftMaskDateTime.hWnd Then
        SftMaskDateTime.Visible = False
        SftMaskDateTime.Enabled = False
        If SaveInput Then
            SftTree1.Cell(EditIndex, EditCol).Text = SftMaskDateTime.TextDisplay
            SftTree1.Cell(EditIndex, EditCol).DataTag = SftMaskDateTime.Contents.DateTime
        End If
    Else
        SftBox1.Visible = False
        SftBox1.Enabled = False
        If SaveInput Then
            SftTree1.Cell(EditIndex, EditCol).Text = SftBox1.Edit.Text
        End If
    End If
End Sub

Private Sub SftTree1_ToolTipVScroll(Text As String, ByVal ItemIndex As Long, ByVal ColIndex As Integer)
    Text = "Item " & ItemIndex & " - " & Text
End Sub

Private Sub SftMaskAmount_UpDownPress(ByVal Up As Boolean, ByVal FieldStart As Long, ByVal FieldEnd As Long, ByVal Counter As Long, Field As String)
    Dim Increment As Single
    If Counter = 0 Or Counter > 5 Then
        If Val(Field) = 0 Then
            Field = 0
        End If
        Increment = 0.01
        If Counter > 14 Then Increment = 0.1
        If Counter > 23 Then Increment = 1
        If Counter > 52 Then Increment = 10
        If Up Then
            Field = Field + Increment
        Else
            Field = Field - Increment
        End If
        ' If Field > yourMaximum Then Field = yourMaximum
        ' If Field < -yourMaximum Then Field = -yourMaximum
        Field = Format(Field, "###0.00")
    End If
End Sub


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