TList™8

 

 

Copyright © 1994 – 2008

Bennet-Tec Information Systems, Inc.

All rights reserved

 

 

 

–     CRITICAL SYNTAX CHANGES -

 

Critical Syntax Changes Since TList 6 /Pro

 

We have worked hard to maintain backward compatibility in syntax for users upgrading from older versions of TList.

 

A few small changes to code may however be required depending on the way in which TList is used within your application.

 

The following changes in TList 7 and 8 may require code changes to TList 6 projects.

     ( no syntax changes are required from TList 7 to TList 8 )

 

 

   * GETITEMRECT – The RECT structure used with this method now has coordinates declared as LONG type instead of Integer.     Change the declaration for RECT structure.

 

   * GRID CELL CLICK EVENT – This event will no longer be fired when end users click on Row Titles or Column Titles.  Instead trap the GridColumnTitleClick or GridRowTitleClick or GridCornerTitleClick event.  

   * SORTING – ItemSorted, ItemSortingMethod, ItemSortingKey

        The ItemSorted property now specifies just On and Off

        A new ItemSortingMethod should be used to specify Ascending or Descending order.

                   0   TLSORT_ASCENDING         (Default) Sort items in the ascending order.

                   1   TLSORT_DESCENDING       Sort items in the descending order.        

        The ItemSortingKey property now determines whether  the data is sorted by visible text

                  ( if empty or unassigned), or by an ItemValue ( if assigned an ItemValue name).  

         The ItemSortingMethod and ItemSortingKey properties also have an optional SortPriority parameter to allow sorting by multiple values( visible data and/or item values)

   * SORTING – Sorted, SortingMethod

         The Values assigned to the Sorted property have been changed from Boolean to Enumated 0/1/2

         The Value –1 for SortingMethod is no longer supported

         An item may be sorted by a prioritized list of multiple Columns or ValueNames,

            each with it's own Sorting Style.

 * TITLES RESIZE EVENT

An additional parameter, objGrid has been added to the event declaration to identify the grid in which the resizing occurs.

 

 * GetItemRect method –  The types of 2nd parameters has changed to enumerated – does not require code changes

* EDITING EVENTS

AfterEditing and RequestEditing  –  type declaration for parameter holding the data has been changed from String to Variant.   An additional parameter, vConvertedText, has been added to AfterEditing event to provide enhanced support for Combobox editing

     TList 6

Sub AfterEditing(ItemIndex As Long, EditedText As String, CancelledBy As Integer)

 

Sub RequestEditing(Cancel As Integer, ItemIndex As Long, TextToEdit As String, Options As Integer)  

     TList 8:

Sub AfterEditing(ByVal ItemIndex As Long, ByVal vEditedText As Variant,
vConvertedText As Variant, ByVal CancelledBy As Integer)

 

Sub RequestEditing(Cancel As Integer, ItemIndex As Long, TextToEdit,
Options As ERequestEditingOptions)

 

   * Grid Row Selection Highlighting

          Selection Highlighting has been improved:

                     - The ColumnHeaders of the ChildItemGrid are no longer shown as selected when the parent of the ItemGrid is selected.

                     - The RowHeader cell is not shown as selected when an item in a Grid is selected.

                     - by default the InvStyle settings no longer apply to rows within a TreeGrid

                       We ( and most customers who commented ) felt that when an item is in a Grid it does not look correct to apply this setting.

                       HOWEVER , you can still achieve the old effect by setting the Modifications Property

                                              TList1.Modifications = TList1.Modifications  _

                                                        OR    TL_MOD_ALWAYS_USE_INVSTYLE

                                              TList1.InvStyle = TLINVS_TEXT

 

 

 

   * ORDER OF EVENTS

 

        The order of events in TList 8 is slightly different such that in MultiSelect mode reading the Selected state of an item in the MouseUP event

        will not show an item going from Selected to UnSelected ( as when toggling selection with CNTRL + Click ) - This change now occurs after the MouseUp is processed.

 

   * DRAG AND DROP – DragDrop, DragOver events, and AutoDragDrop processing

        

        A) TList now handles Automated Drag and Drop internally using OLE Drag Drop instead  of VB style DragDrop technology.   As a result the VB events DragDrop and DragOver can no longer be triggered as a result of automated DragDrop actions. 

            Instead use the DragDropEx and DragOverEx events for handling action in response to automated drag and drop, or modify code to make use of new OleDragDrop and OleDragOver events.

 

B)     The methods BeforeDrag, OnDragDrop and OnDragOver  are no longer used and should be removed from the project.

 

C) The DropTarget property which was used in connection with VB Drag Drop is now used instead for OLE DragDrop    It is no longer supported for use with VB DragDrop

 

      Workaround - the DropTarget may be retrieved within DragDrop, and DragOver events using the following code

 

         Dim nX As Integer, nY As Integer, DropTarget As Long

     nX = X / Screen.TwipsPerPixelX

     nY = Y / Screen.TwipsPerPixelY

     DropTarget = TList1.GetItemByXY(nX, nY, PTFIND_ITEM)

 

D) For examples of use of VB Drag Drop mechanisms see the

        updated sample VB project

 

                  "Sample 07. Using VB Drag-Drop"

 

E) The Best approach for most users of older TList editions is to adopt the new Automated Drag drop functionality of TList.   This can meet most application needs and requires very little coding.

Just set the AutoDragMode property of TList – That’s it, and you are done.   Or set OleDragMode and OleDropMode properties.

 

F)  The DragHighlight property is now used only in OLEDragDrop mode.   It no longer applies to VB Style DragDrop.    To simulate DragHighlight when using VBStyle Drag Drop

Set the ListIndex property within the DragOver event as user moves over some item

For instance

 

         Dim nX As Integer, nY As Integer, DropTarget As Integer

         If Source.Tag = "TREE" Then ' Source is a TList control

             nX = X / Screen.TwipsPerPixelX

             nY = Y / Screen.TwipsPerPixelY

             TList1.ListIndex = DropTarget

         End If