Unit mStrGrid

Classes

TmStrGrid -

Functions

Register -

Types

HandleFixed
mSortState
TMSortType

Constants

Variables


Functions


procedure Register;


Types


HandleFixed = (hfNot,hfSmart,hfYes);
Version 2.2c, 20.2.1997, PostCardWare, Albrecht Mengel, mengel@stat-econ.uni-kiel.de See mStrGrid.txt If you have problems/new ideas with mStrGrid or mStrList, please feel free to email me! New: Method ReorderCompleteRows(KeyCol:integer; OrderValues:TStrings); Just call with the wished order of the KeyColumn as StringList. This sets all columns into that same order. Known Problems: No duplicate values allowed in OrderValues nor in the key column OderValues must be a true permutation of the key column If UseFixed=hfSmart (default), the fixed rows are excluded from reordering and so the number of entries in OrderValues must be the same as the non-fixed entries in the grid column. New: Multi-Key sorting is possible now with SortCompletRows (and SortCompleteColumns): First sort the least important column(s), then sort the most important column(s). (The order of equal-valued entries is kept). As result, the whole table is sorted after the most important column. If any values there are equal, the table is sorted by the next less important value, and so on. (There is an expample supplied to test this property) Tip for coloring mStrGrid: see mStrGrid.txt Tip for sorting by clicking at a title cell: see mStrGrid.txt New date sorting Properties: DateTimeFormat:string; ShortYearExpand:boolean; ShortYearBorder:(0..99) When sorting dates, they are interpreted in the kind as DateTimeFormat is set to. Default is the value of (the global) ShortDateFormat+' '+LongTimeFormat. See mStrGrid.txt for more description For ever: Unsolvable problem with Click into fixed cells: The (programmer of the) OnClick procedure whishes to use COL and ROW to determine which cell was clicked. But the assigment of COL and ROW to a fixed cell does not work (I cannot change that). To implement the wished behavior I set temporarily fixedcols/fixedrows to zero, while the OnClick is running. The published methods of this unit know the original values and work correct. But You as normal programmer find fixedcols/fixedrows in OnClick to be zero, when clicked a fixed cell. As cold comfort you may read the properties SavedFixedRows and SavedFixedCols, which contain the original values (I published them in this version). If you wish to alter fixedcols/fixedrows in OnClick, just assign new values to SavedFixedCols/SavedFixedRows. They set fixedcols/fixedrows when OnClick finishes
mSortState = (Unsorted,CompleteRows,CompleteCols,SingleCol,SingleRow,AllRows,AllCols);

TMSortType = (soString,soStringCaseSensitive,soNumeric,soDate);

Constants


Variables