1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
|
object MainForm: TMainForm
Left = 188
Height = 396
Top = 104
Width = 649
ActiveControl = MyTree
Caption = 'Data Array Virtual Tree Demo'
ClientHeight = 396
ClientWidth = 649
Position = poScreenCenter
LCLVersion = '3.99.0.0'
OnClose = FormClose
OnCreate = FormCreate
object Label1: TLabel
AnchorSideLeft.Control = Label3
AnchorSideTop.Control = Edit1
AnchorSideTop.Side = asrCenter
Left = 224
Height = 15
Top = 319
Width = 167
Caption = 'Array data of the clicked node:'
ParentColor = False
end
object Label2: TLabel
AnchorSideLeft.Control = Label3
AnchorSideBottom.Control = Label3
Left = 224
Height = 15
Top = 344
Width = 247
Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 6
Caption = 'Find and show the node by specific array index'
ParentColor = False
end
object Label3: TLabel
AnchorSideLeft.Control = btnDelete
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Edit2
AnchorSideTop.Side = asrCenter
Left = 224
Height = 15
Top = 365
Width = 259
BorderSpacing.Left = 32
BorderSpacing.Right = 6
Caption = 'Type index to get related tree node on the screen:'
ParentColor = False
end
object Button1: TButton
AnchorSideLeft.Control = MyTree
AnchorSideTop.Control = Edit1
AnchorSideTop.Side = asrCenter
Left = 6
Height = 25
Top = 314
Width = 83
BorderSpacing.InnerBorder = 4
Caption = 'Add nodes'
TabOrder = 0
OnClick = Button1Click
end
object btnDelete: TButton
AnchorSideLeft.Control = Button1
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Button1
Left = 95
Height = 25
Top = 314
Width = 97
BorderSpacing.Left = 6
BorderSpacing.InnerBorder = 4
Caption = 'Delete selected'
TabOrder = 1
OnClick = btnDeleteClick
end
object Edit1: TEdit
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Button1
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = Edit2
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Label2
Left = 410
Height = 23
Top = 315
Width = 170
Anchors = [akRight, akBottom]
BorderSpacing.Around = 6
ReadOnly = True
TabOrder = 2
end
object btnCleanAll: TButton
AnchorSideTop.Control = Edit2
AnchorSideTop.Side = asrCenter
Left = 56
Height = 25
Top = 360
Width = 75
BorderSpacing.InnerBorder = 4
Caption = 'Clean all'
TabOrder = 3
OnClick = btnCleanAllClick
end
object Edit2: TEdit
AnchorSideLeft.Control = Label3
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 489
Height = 23
Top = 361
Width = 97
Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 12
TabOrder = 4
OnChange = Edit2Change
end
object MyTree: TLazVirtualStringTree
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Edit1
Left = 6
Height = 303
Top = 6
Width = 637
Anchors = [akTop, akLeft, akRight, akBottom]
AutoScrollDelay = 1
BorderSpacing.Around = 6
DefaultText = 'Node'
Header.AutoSizeIndex = 0
Header.Columns = <
item
Position = 0
Text = 'Text'
Width = 150
end
item
Options = [coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible]
Position = 1
Text = 'Pointers'
Width = 300
end
item
Position = 2
Text = 'Random'
Width = 100
end>
Header.DefaultHeight = 17
Header.Font.Style = [fsBold]
Header.Height = 17
Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoShowSortGlyphs, hoVisible]
Header.SortColumn = 0
RootNodeCount = 10
TabOrder = 5
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking]
TreeOptions.SelectionOptions = [toMultiSelect]
OnBeforeCellPaint = MyTreeBeforeCellPaint
OnCompareNodes = MyTreeCompareNodes
OnFocusChanged = MyTreeFocusChanged
OnFreeNode = MyTreeFreeNode
OnGetText = MyTreeGetText
OnPaintText = MyTreePaintText
OnHeaderClick = MyTreeHeaderClick
end
end
|