object Form1: TForm1 Left = 489 Height = 438 Top = 219 Width = 722 Caption = 'TIBTreeView Example' ClientHeight = 438 ClientWidth = 722 DefaultMonitor = dmPrimary OnClose = FormClose OnShow = FormShow Position = poScreenCenter LCLVersion = '2.2.0.2' object Panel1: TPanel Left = 11 Height = 367 Top = 32 Width = 682 Anchors = [akTop, akLeft, akRight, akBottom] BevelOuter = bvNone ClientHeight = 367 ClientWidth = 682 TabOrder = 0 object IBTreeView1: TIBTreeView Left = 0 Height = 367 Top = 0 Width = 280 Align = alLeft TextField = 'DEPARTMENT' DataSource = DataSource1 DragMode = dmAutomatic Images = ImageList1 HasChildField = 'CHILDCOUNT' ImageIndexField = 'IMAGEINDEX' SelectedIndexField = 'IMAGEINDEX' KeyField = 'DEPT_NO' ParentField = 'HEAD_DEPT' PopupMenu = PopupMenu1 RelationName = 'A' ScrollBars = ssAutoBoth TabOrder = 0 OnDragDrop = IBTreeView1DragDrop OnDragOver = IBTreeView1DragOver end object Splitter1: TSplitter Left = 280 Height = 367 Top = 0 Width = 5 end object Panel2: TPanel Left = 285 Height = 367 Top = 0 Width = 397 Align = alClient BevelInner = bvLowered BevelOuter = bvLowered ClientHeight = 367 ClientWidth = 397 TabOrder = 2 object Panel3: TPanel Left = 2 Height = 190 Top = 2 Width = 393 Align = alTop BevelOuter = bvNone ClientHeight = 190 ClientWidth = 393 TabOrder = 0 object Label2: TLabel Left = 11 Height = 15 Top = 16 Width = 25 Caption = 'Title' end object DBEdit1: TDBEdit Left = 11 Height = 24 Top = 31 Width = 373 DataField = 'DEPARTMENT' DataSource = DataSource1 Anchors = [akTop, akLeft, akRight] MaxLength = 0 TabOrder = 0 end object Label3: TLabel Left = 13 Height = 15 Top = 71 Width = 50 Caption = 'Location' end object DBEdit4: TDBEdit Left = 13 Height = 24 Top = 86 Width = 179 DataField = 'LOCATION' DataSource = DataSource1 MaxLength = 0 TabOrder = 1 end object Label4: TLabel Left = 219 Height = 15 Top = 71 Width = 44 Caption = 'Budget' end object DBEdit2: TDBEdit Left = 219 Height = 24 Top = 86 Width = 165 DataField = 'BUDGET' DataSource = DataSource1 Anchors = [akTop, akLeft, akRight] MaxLength = 0 TabOrder = 2 end object Label5: TLabel Left = 219 Height = 15 Top = 121 Width = 61 Caption = 'Phone No.' end object DBEdit3: TDBEdit Left = 219 Height = 24 Top = 136 Width = 165 DataField = 'PHONE_NO' DataSource = DataSource1 Anchors = [akTop, akLeft, akRight] MaxLength = 0 TabOrder = 3 end object Label6: TLabel Left = 12 Height = 15 Top = 121 Width = 52 Caption = 'Manager' end object IBLookupComboEditBox1: TIBLookupComboEditBox Left = 13 Height = 27 Top = 136 Width = 180 DataField = 'MNGR_NO' DataSource = DataSource1 KeyField = 'EMP_NO' ListField = 'FULL_NAME' ListFieldIndex = 0 ListSource = DataSource2 LookupCache = False TabOrder = 4 AutoInsert = False AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending] ItemHeight = 0 end object Label7: TLabel Left = 12 Height = 15 Top = 172 Width = 115 Caption = 'Departmental Staff' end end object IBDynamicGrid1: TIBDynamicGrid Left = 16 Height = 159 Top = 192 Width = 365 Align = alClient BorderSpacing.Left = 14 BorderSpacing.Right = 14 BorderSpacing.Bottom = 14 Color = clWindow Columns = < item Title.Alignment = taCenter Title.Caption = 'Name' Width = 100 FieldName = 'FULL_NAME' AutoSizeColumn = True InitialSortColumn = False DBLookupProperties.ItemHeight = 0 DBLookupProperties.ItemWidth = 0 DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending] end item Title.Alignment = taCenter Title.Caption = 'Job Code' Width = 60 FieldName = 'JOB_CODE' AutoSizeColumn = False InitialSortColumn = False DBLookupProperties.ItemHeight = 0 DBLookupProperties.ItemWidth = 0 DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending] end item Title.Alignment = taCenter Title.Caption = 'Location' Width = 70 FieldName = 'JOB_COUNTRY' AutoSizeColumn = False InitialSortColumn = False DBLookupProperties.ItemHeight = 0 DBLookupProperties.ItemWidth = 0 DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending] end item Title.Alignment = taCenter Title.Caption = 'Salary' Width = 100 FieldName = 'SALARY' AutoSizeColumn = False InitialSortColumn = False DBLookupProperties.ItemHeight = 0 DBLookupProperties.ItemWidth = 0 DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending] end> DataSource = DataSource3 Scrollbars = ssAutoVertical TabOrder = 1 ExpandEditorPanelBelowRow = False Descending = False EditorBorderStyle = bsSingle DefaultPositionAtEnd = False end end end object Label1: TLabel Left = 11 Height = 15 Top = 17 Width = 79 Caption = 'Departments' end object CancelBtn: TButton Left = 616 Height = 25 Top = 408 Width = 75 Anchors = [akRight, akBottom] Caption = 'Cancel' OnClick = CancelBtnClick TabOrder = 1 end object SaveBtn: TButton Left = 536 Height = 25 Top = 408 Width = 75 Anchors = [akRight, akBottom] Caption = 'Save' OnClick = SaveBtnClick TabOrder = 2 end object IBDatabase1: TIBDatabase Connected = False CreateIfNotExists = False AllowStreamedConnected = False DatabaseName = 'localhost:employee' Params.Strings = ( 'lc_ctype=UTF8' 'user_name=SYSDBA' ) DefaultTransaction = IBTransaction1 IdleTimer = 0 SQLHourGlass = False TraceFlags = [] UseDefaultSystemCodePage = False Left = 24 Top = 96 end object IBTransaction1: TIBTransaction TransactionName = '{08363C28-2EB0-401D-AE6A-2B878D6B69CD}' Active = False Params.Strings = ( 'read_committed' 'rec_version' 'nowait' ) Left = 24 Top = 136 end object Departments: TIBDataSet AllowAutoActivateTransaction = False Database = IBDatabase1 Transaction = IBTransaction1 AfterDelete = DepartmentsAfterDelete AfterEdit = DepartmentsAfterDelete AfterInsert = DepartmentsAfterInsert BufferChunks = 1000 BufferChunksInFirstBlock = 50 CachedUpdates = False CaseSensitiveParameterNames = False EnableStatistics = False DeleteSQL.Strings = ( 'Delete From DEPARTMENT A' 'Where A.DEPT_NO = :DEPT_NO' ) InsertSQL.Strings = ( 'Insert Into DEPARTMENT(DEPT_NO, DEPARTMENT, HEAD_DEPT, MNGR_NO, BUDGET, LOCATION, PHONE_NO)' 'Values(:DEPT_NO, :DEPARTMENT, :HEAD_DEPT, :MNGR_NO, :BUDGET, :LOCATION, :PHONE_NO)' ) RefreshSQL.Strings = ( 'Select A.DEPT_NO, A.DEPARTMENT, A.HEAD_DEPT, A.MNGR_NO, A.BUDGET, A.LOCATION, A.PHONE_NO,' 'count(B.DEPT_NO) as ChildCount,' 'case' ' when A.Budget < 500000 then 0' ' when A.Budget = 500000 then 2' ' else 1 end as ImageIndex' 'From DEPARTMENT A' 'Left Outer JOIN DEPARTMENT B On B.HEAD_DEPT = A.DEPT_NO' 'Where A.DEPT_NO = :DEPT_NO' 'Group By A.DEPT_NO, A.DEPARTMENT, A.HEAD_DEPT, A.MNGR_NO, A.BUDGET, A.LOCATION, A.PHONE_NO' '' ) SelectSQL.Strings = ( 'Select A.DEPT_NO, A.DEPARTMENT, A.HEAD_DEPT, A.MNGR_NO, A.BUDGET, A.LOCATION, A.PHONE_NO,' 'count(B.DEPT_NO) as ChildCount,' 'case' ' when A.Budget < 500000 then 0' ' when A.Budget = 500000 then 2' ' else 1 end as ImageIndex' 'From DEPARTMENT A' 'Left Outer JOIN DEPARTMENT B On B.HEAD_DEPT = A.DEPT_NO' 'Group By A.DEPT_NO, A.DEPARTMENT, A.HEAD_DEPT, A.MNGR_NO, A.BUDGET, A.LOCATION, A.PHONE_NO' 'Order by Department' ) ModifySQL.Strings = ( 'Update DEPARTMENT A Set '#13#10' A.BUDGET = :BUDGET,'#13#10' A.DEPARTMENT = :DEPARTMENT,'#13#10' A.HEAD_DEPT = :HEAD_DEPT,'#13#10' A.LOCATION = :LOCATION,'#13#10' A.MNGR_NO = :MNGR_NO,'#13#10' A.PHONE_NO = :PHONE_NO' 'Where A.DEPT_NO = :OLD_DEPT_NO' ) GeneratorField.Generator = 'EMP_NO_GEN' GeneratorField.Field = 'DEPT_NO' GeneratorField.ApplyOnEvent = gaeOnNewRecord GenerateParamNames = False MasterDetailDelay = 0 DataSetCloseAction = dcSaveChanges TZTextOption = tzOffset DefaultTZDate = 43831 SQLFiltered = False AfterTransactionEnd = DepartmentsAfterTransactionEnd Left = 144 Top = 176 object DepartmentsDEPT_NO: TIBStringField DisplayWidth = 3 FieldKind = fkData FieldName = 'DEPT_NO' Index = 0 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True Size = 3 end object DepartmentsDEPARTMENT: TIBStringField DisplayWidth = 25 FieldKind = fkData FieldName = 'DEPARTMENT' Index = 1 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True Size = 25 end object DepartmentsHEAD_DEPT: TIBStringField DisplayWidth = 3 FieldKind = fkData FieldName = 'HEAD_DEPT' Index = 2 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = False Size = 3 end object DepartmentsMNGR_NO: TSmallintField DisplayWidth = 10 FieldKind = fkData FieldName = 'MNGR_NO' Index = 3 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = False end object DepartmentsBUDGET: TIBBCDField DisplayWidth = 18 FieldKind = fkData FieldName = 'BUDGET' Index = 4 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = False OnGetText = DepartmentsBUDGETGetText Precision = 18 Currency = False MaxValue = 0 MinValue = 0 Size = 2 end object DepartmentsLOCATION: TIBStringField DisplayWidth = 15 FieldKind = fkData FieldName = 'LOCATION' Index = 5 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = False Size = 15 end object DepartmentsPHONE_NO: TIBStringField DisplayWidth = 20 FieldKind = fkData FieldName = 'PHONE_NO' Index = 6 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = False end object DepartmentsIMAGEINDEX: TIBIntegerField FieldKind = fkData FieldName = 'IMAGEINDEX' Index = 7 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True end object DepartmentsCHILDCOUNT: TIBLargeIntField FieldKind = fkData FieldName = 'CHILDCOUNT' Index = 8 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True end end object DataSource1: TDataSource DataSet = Departments Left = 24 Top = 176 end object ApplicationProperties1: TApplicationProperties OnIdle = ApplicationProperties1Idle Left = 24 Top = 48 end object Managers: TIBQuery AllowAutoActivateTransaction = False Database = IBDatabase1 Transaction = IBTransaction1 BufferChunks = 1000 BufferChunksInFirstBlock = 50 CachedUpdates = False CaseSensitiveParameterNames = False EnableStatistics = False GenerateParamNames = False GeneratorField.ApplyOnEvent = gaeOnNewRecord MasterDetailDelay = 0 SQL.Strings = ( 'Select A.EMP_NO, A.FULL_NAME From EMPLOYEE A' 'order by 2' ) Params = <> SQLFiltered = False DataSetCloseAction = dcDiscardChanges TZTextOption = tzOffset DefaultTZDate = 43831 Left = 144 Top = 224 end object DataSource2: TDataSource DataSet = Managers Left = 24 Top = 221 end object Staff: TIBQuery AllowAutoActivateTransaction = False Database = IBDatabase1 Transaction = IBTransaction1 BufferChunks = 1000 BufferChunksInFirstBlock = 50 CachedUpdates = False CaseSensitiveParameterNames = False DataSource = DataSource1 EnableStatistics = False GenerateParamNames = False GeneratorField.ApplyOnEvent = gaeOnNewRecord MasterDetailDelay = 0 SQL.Strings = ( 'Select A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME From EMPLOYEE A' 'Where A.DEPT_NO =:DEPT_NO' ) Params = < item DataType = ftUnknown Name = 'DEPT_NO' ParamType = ptInput end> SQLFiltered = False DataSetCloseAction = dcDiscardChanges TZTextOption = tzOffset DefaultTZDate = 43831 Left = 144 Top = 272 ParamData = < item DataType = ftUnknown Name = 'DEPT_NO' ParamType = ptInput end> object StaffEMP_NO: TSmallintField DisplayWidth = 10 FieldKind = fkData FieldName = 'EMP_NO' Index = 0 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True end object StaffFIRST_NAME: TIBStringField DisplayWidth = 15 FieldKind = fkData FieldName = 'FIRST_NAME' Index = 1 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True Size = 15 end object StaffLAST_NAME: TIBStringField DisplayWidth = 20 FieldKind = fkData FieldName = 'LAST_NAME' Index = 2 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True end object StaffPHONE_EXT: TIBStringField DisplayWidth = 4 FieldKind = fkData FieldName = 'PHONE_EXT' Index = 3 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = False Size = 4 end object StaffHIRE_DATE: TDateTimeField DisplayWidth = 10 FieldKind = fkData FieldName = 'HIRE_DATE' Index = 4 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True end object StaffDEPT_NO: TIBStringField DisplayWidth = 3 FieldKind = fkData FieldName = 'DEPT_NO' Index = 5 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True Size = 3 end object StaffJOB_CODE: TIBStringField DisplayWidth = 5 FieldKind = fkData FieldName = 'JOB_CODE' Index = 6 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True Size = 5 end object StaffJOB_GRADE: TSmallintField DisplayWidth = 10 FieldKind = fkData FieldName = 'JOB_GRADE' Index = 7 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True end object StaffJOB_COUNTRY: TIBStringField DisplayWidth = 15 FieldKind = fkData FieldName = 'JOB_COUNTRY' Index = 8 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True Size = 15 end object StaffSALARY: TIBBCDField DisplayWidth = 18 FieldKind = fkData FieldName = 'SALARY' Index = 9 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = False Required = True OnGetText = DepartmentsBUDGETGetText Precision = 18 Currency = False MaxValue = 0 MinValue = 0 Size = 2 end object StaffFULL_NAME: TIBStringField DisplayWidth = 37 FieldKind = fkData FieldName = 'FULL_NAME' Index = 10 LookupCache = False ProviderFlags = [pfInUpdate, pfInWhere] ReadOnly = True Required = False Size = 37 end end object DataSource3: TDataSource DataSet = Staff Left = 24 Top = 264 end object ActionList1: TActionList Left = 24 Top = 316 object DeleteNode: TAction Caption = 'Delete' OnExecute = DeleteNodeExecute OnUpdate = DeleteNodeUpdate end object AddChild: TAction Caption = 'Add Department to Child List' OnExecute = AddChildExecute OnUpdate = DeleteNodeUpdate end object AddSibling: TAction Caption = 'Add Sibling' OnExecute = AddSiblingExecute OnUpdate = DeleteNodeUpdate end object AddFirstChild: TAction Caption = 'Add Department as First Child' OnExecute = AddFirstChildExecute OnUpdate = DeleteNodeUpdate end end object PopupMenu1: TPopupMenu Left = 64 Top = 318 object MenuItem3: TMenuItem Action = AddSibling end object MenuItem4: TMenuItem Action = AddFirstChild end object MenuItem2: TMenuItem Action = AddChild end object MenuItem1: TMenuItem Action = DeleteNode end end object ImageList1: TImageList Left = 64 Top = 136 Bitmap = { 4C7A030000001000000010000000830200000000000078DAED96DD4FD2511CC6 BBE2BFA8F9AE65CE9AD3E1CC581A26904A395F28C182207AD10CCD2901338C7C 43F3059B32B4D0B459DA56EB828DA9248A412DA4ECC5F843B87C3AE7B745ADB5 E4B07151F3E2B9FCEC77CEF99DCF73BE00F62101D16EB6E1B2AF15EAB5162857 9AC0CA6B367498F9FA0C8FBE2C40EED232F32ACF0D4C7F7E02C7F61C642F55CC 7CA3FB2AECDBB398F8E844F55339337FFE951A0F3E3C846DCB81CA993A66BE76 A91163413B86DF4FA0DC2E65E6A5F3320CBD1BC7C0DB31948C8A9979F17435FA 0323E8F10FE1587F29332F1C3F0DCBA615665F1F0ACCC54C7CA94DC2AFB4D7E0 CE460F4C5E0B8EEA0B62E6C95E5DC5566144BD741DC63533F4AFBB20199522B3 E970244D9BE5DE8D277BE5F1BB8FEF9C99AC43A7C784F65503CA062548D56486 9394A9BC58D791732B2F587EBF0242AB1829EA8C503C0EA55F39B89E7C29DD8F 04399AE810FFFDC4FFF57858E27FC814E8C5ED3716EA7F90A177789A755DD810 E889FADFEA31A26651B1439CD8F5FFA9BD37DDCAD5E648A7AF3BEABFD17B0F55 8FEB23C409573CFECB17D51039CEF2F7FC8F3D82C1B2B8FCFF91428B20EA7FB6 EE08339F672C8CFA9F712D9B9927FEA36D590FDD7207F59F99CF6ACE01F11FC4 7F1CB890827FB503FEA79C9AAC729F1811F1E2E5091B29EA2D09FF6956A221DD 838B6456A2F34EFD0B25AA171A50E1AC05F92E088B73B34AD44C3520B7233FF4 3B3FF7ED39372FD1CEA3BD45BB87F607ED80BEC030717180F3893A211E91D2BB E5FFA5F3B839CBF1698EEB3BDBD614D73BB43BA8FFD46193F72EE752FB8A817B D3925569D15EFFDB9AC97E91DF550441AF1032A702270744940DB29EDDA1965C 3E597384B03BF19E3F615DFB1549BCBDBBFC33DF01FF988370 } end end