User Tools

Site Tools


arealist_pro_v10_new_properties

The new AreaList Pro v10 properties are described in this section.


MySQL access

property constant read write persi
stent
type default min max usage
ALP_MySQLErrorNumber int Error code from last MySQL call
ALP_MySQLErrorMessage text Error text from last MySQL call

Area properties

property constant read write persi
stent
type default min max usage
ALP_Area_DragMoveColumnsboolno Physically reorder columns on column drag (instead of modifying the grid)
ALP_Area_NamedSelection text Name of the named selection to use
Similar to fields mode (setup the fields as usual), but using named selection
ALP_Area_Zoom real10,15Zoom factor for every text in the area
ALP_Area_GroupHeaderbool012Add a group header above (1) or replacing (2) column headers
Setup ALP_Column_GroupID and ALP_Column_GroupHdrText
ALP_Area_Transposedboolno Exchange (visually) the rows and columns
ALP_Area_OneLineHdrboolno One cell for each column header regardless of ALP_Area_RowsInGrid in “grid” mode (ALP_Area_RowsInGrid >1)
Header text is set by ALP_Column_HeaderText of the array/field defined for the first line of the grid
ALP_Area_OneLineFtrboolno One cell for each column footer regardless of ALP_Area_RowsInGrid in “grid” mode (ALP_Area_RowsInGrid >1)
Footer text is set by ALP_Column_FooterText of the array/field defined for the first line of the grid
ALP_Area_AutoHierarchytext List of columns separated with comma to use for break processing
Implies break processing (automatic break headers) and hierarchy
You can add break footers
ALP_Area_HdrPictIDint0 IconID to be used above the vertical scrollbar
ALP_Area_HdrPictFlagsint0020 = no callback 1 = callback on mouseUp 2 = callback on mouseDown
ALP_Area_HdrPictCallbackMethtext Callback method for the click on user icon ($1 = area)
ALP_Area_Appearanceint-1-112Appearance to use for native headers and checkboxes
-1 = system (get the pictures from current system)
0 = automatic (use pictures best matching current system appearance)
1 = OS 9 Platinum
2 = OSX 8 Aqua
3 = Win XP
4 = Win Vista
5 = Win 7
6 = OSX 8 Graphite
7 = OSX 10 Aqua
8 = OSX Graphite
9 = Win 8
10 = Win 10
11 = pictures set by developer
ALP_Area_IgnoreMouseWheel int003Used as bitfield:
bit 0 (value 1) = ignore horizontal scrolling with mouse wheel
bit 1 (value 2) = ignore vertical scrolling with mouse wheel
ALP_Area_EntryMethod int1
or 7
015Use the 10.0 entry widget according to data type
Used as bitfield:
bit 0 (value 1) = styled text
bit 1 (value 2) = plain text
bit 3 (value 4) = integer/real/date/time
bit 4 (value 8) = picture

• Default for LTR system is 1.
• Default for RTL system is 7.
• Checkbox, radio buttons and “draw integers as pictures” are always handled directly, not in the 10.0 entry widget.
• Not using the 10.0 entry widget for styled text (i.e. bit 0 false) means the 10.1 native editor is used and the user will edit
“<SPAN …>text</SPAN>”, not styled text.
• Using the 10.0 entry widget means you can use ALP_Column_EntryFormat, but you can’t have keyboard shortcuts executed for your form during editing.

How enterable cells behave according to ALP_Area_EntryFirstClickMode with ALP_Area_EntryMethod default value (native widget except styled text)

ALP_Area_EntryFirstClickMode = 0, cell value does not matter: that click is interpreted by the widget → no selection, caret is somewhere in the text.
ALP_Area_EntryFirstClickMode = 1, value is “not empty” (e.g. 123.45) - identical to ALP_Area_EntryClick = 0.
ALP_Area_EntryFirstClickMode = 1, value is “empty” (e.g. 0.00) - that zero is selected, caret is at the end.
ALP_Area_EntryFirstClickMode = 2, value is “not empty” (e.g. 123.45) - that value is selected, caret is at the end.
ALP_Area_EntryFirstClickMode = 2, value is “empty” (e.g. 0.00) - that zero is not selected, caret is where you clicked.
ALP_Area_EntryFirstClickMode = 3, cell value does not matter: that click is not interpreted by the widget → cell value is selected, caret is at the end.

property constant read write persi
stent
type default min max usage
ALP_Area_AutoresizeAllColumnsint0020 = none
1 = List box style (shrink to fit)
2 = HTML like (proportional resizing of marked columns)
See How to use ALP_Column_Proportional and ALP_Area_AutoresizeAllColumns below Column properties
ALP_Area_EmptyRowColorcolor0 When set to non-zero, used to color empty rows below last data row
To hide the column dividers in this area: set ALP_Area_ShowColDivider bit 3 to 1 (add value 8)
To hide the row dividers in this area: set ALP_Area_ShowRowDividers bit 1 to 1 (add value 2)
ALP_Area_HeaderDivColor colorblack Used when ALP_Area_HeaderMode = 0 and appearance is Windows 10 (-1, 0 resolving to Windows 10 or explicit 10 = AL Force Win10 Interface)
Originally used in PrintList Pro, now used in AreaList Pro

Note: the header divider line is drawn only when ALP_Area_HeaderMode is zero and appearance is Win10 or Pictures (11 = AL Use Pictures Interface).
AreaList Pro v10 always uses pictures when ALP_Area_HeaderMode is zero.
Either specified by developer (appearance = 11), created by native code (appearance = -1 = AL Native Interface) or the respective pictures for the chosen/resolved appearance from the Resources directory in the plugin’s bundle.

property constant read write persi
stent
type default min max usage
ALP_Area_HideEntryFocusint003Used as bitfield:
bit 0 (value 1) = don’t draw focus rectangle for text entry (text, int, real, date, time)
bit 1 (value 2) = don’t draw focus rectangle for other entry types (checkbox, radio, picture)
ALP_Area_ClickedVisualRow int When using break processing, the second visual row is very likely the first data row (break header is first row)
ALP_Area_ClickedRowNum int The real row number (differs from ALP_Area_ClickedRow only when using ALP_Area_Transposed)
ALP_Area_ClickedColNum int The real column number (differs from ALP_Area_ClickedCol only when using ALP_Area_Transposed)
ALP_Area_RollOverVisualRow int Similar to ALP_Area_ClickedVisualRow, but for Mouse Over
ALP_Area_RollOverRowNum int Similar to ALP_Area_ClickedRowNum, but for Mouse Over
ALP_Area_RollOverColNum int Similar to ALP_Area_ClickedColNum, but for Mouse Over
ALP_Area_EntryCellRow int Visual cell row number (can differ when using break processing or transposition)
ALP_Area_EntryCellColumn int Visual cell column number (can differ when using break processing or transposition)
ALP_Area_AltHdrRowsInGrid int Number of rows in alternate header grid
ALP_Area_AltHdrClear n/a Clear the alternate header grid & cells

Column properties

property constant read write persi
stent
type default min max usage
ALP_Column_FormatResolved text Resolved 4D format (when format uses “Format”)
ALP_Column_CallbackFnctext Callback method for “formula” column
ALP_Column_Sortablebool1 (including non sortable data such as pictures) Allow column to be sorted if the column is “sortable” (see below)
Result of a click in header according to ALP_Column_Sortable and ALP_Area_UserSort

ALP_Column_Sortable allows the column to be sorted if the area allows sort with ALP_Area_UserSort = AL User sort on (1) or AL User sort index only (3) if the column displays an indexed field (or an array), or the sort to be bypassed with ALP_Area_UserSort = AL User sort bypass (2).

When a click occurs in the column header, AL Sort button event (-1) is reported if the column is sortable and ALP_Area_UserSort is not AL User sort off (0).
AL Column click event (-10) is reported in all other cases.

The column is “sortable” if ALP_Column_Sortable = 1 and the data allows sort (e.g. not a picture column or calculated column) and the header “cell” is directly associated with a column (e.g. not in a group header).

ALP_Column_Draggableboolyes Allow column to be dragged
ALP_Column_Resizableboolyes Allow column to be resized
ALP_Column_LimitLengthint0 Limit text entry length
0 = no limit
ALP_Column_MinWidthreal00512Minimum width for the column
ALP_Column_Placeholdertext Entry placeholder
ALP_Column_GroupIDint0 ID for grouping columns together: columns with the same group ID will be grouped
0 means “no grouping for the column”
ALP_Column_GroupHdrTexttext Text to use in group header (displayed when ALP_Area_GroupHeader is set to 1 or 2)
The text is defined for the first column in the group
ALP_Column_IconIDint0 IconID to use as popup icon
0 = use default (depends on data type)
ALP_Column_PopupEntryint002Popup entry type
0 = default (depends on data type)
1 = date
2 = time
ALP_Column_EntryAllowReturnboolinherited from area ALP_Area_Entry
AllowReturn
Allow RETURN in text
Changed when you set ALP_Area_EntryAllowReturn)
ALP_Column_UseEllipsisint-1-12Use ellipsis for data of this column
-1 = use area's default (ALP_Area_UseEllipsis)
0 = none
1 = on right side for left-aligned, centered otherwise
2 = on right side for left-aligned, on left side for right-aligned, centered otherwise
ALP_Column_HdrUseEllipsisint-1-12Use ellipsis for header of this column
-1 = use area's default (ALP_Area_UseEllipsis)
0 = none
1 = on right side for left-aligned, centered otherwise
2 = on right side for left-aligned, on left side for right-aligned, centered otherwise
ALP_Column_FtrUseEllipsisint-1-12Use ellipsis for footer of this column
-1 = use area's default (ALP_Area_UseEllipsis)
0 = none
1 = on right side for left-aligned, centered otherwise
2 = on right side for left-aligned, on left side for right-aligned, centered otherwise
ALP_Column_MaxWidthreal32000032000Maximum width for the column
When smaller than ALP_Column_MinWidth, ALP_Column_MinWidth is used
ALP_Column_Proportionalboolno To be used along with ALP_Area_AutoresizeAllColumns value = 2 (see below)
How to use ALP_Column_Proportional and ALP_Area_AutoresizeAllColumns

Set ALP_Column_MinWidth, otherwise the columns will be 0 points wide!

Two modes (values) are available for ALP_Area_AutoresizeAllColumns:

1 = List box style (shrink to fit):
• if there is enough space, nothing is resized
• if there is not enough space, all columns are sized to minimum (ALP_Column_MinWidth) and then columns from right are sized to normal size (if there is enough space) until the space is exhausted.
ALP_Column_Proportional is ignored in this mode.

2 = HTML like (proportional resizing of marked columns)
To have any effect, at least one visible column must have ALP_Column_Proportional set to 1!
Only visible columns with ALP_Column_Proportional property set to 1 are resized
The difference (shrink/expand) is distributed proportionally across the columns (if possible - honoring min/max width) using current column width
e.g. if you have one column with width 100, another one with width 200, the first one will get 1/3 of the resize, the second one will get 2/3 of the resize
If only one visible column has this property set, it behaves similarly to ALP_Area_AutoResizeColumn.

Example with value 2 (using ALP_Column_Proportional)
10 columns are set with their respective width. No matter how the width is set: computed from data (ALP_ColumnWidthUser = 0) or set by developer, or by user resizing the column.
3 columns out of these 10 have ALP_Column_Proportional set to 1.
When you grow “enough” the AreaList Pro area, 7 columns with “fixed” width will stay as they are, the other 3 (with ALP_Column_Proportional = 1) will be enlarged.
How much? Depends on the “fixed” width, and of course on the ALP_Column_MaxWidth values.
If these 3 columns are 40, 60 & 80 points, but the available space is 300 (the rest of the available space is used for the “fixed size” columns), they will be sized proportionally (assuming min/max width is not exceeded) to 66, 100 and 134.
In other words, you (or the user) set the basic width, but the actual width according to the (modified) area width is computed from the sum of the widths (of the “resizable” columns) and available width. Something similar is used when you shrink the area.
In that respect, you really need to set the ALP_Column_MinWidth to a usable value (default is zero).

property constant read write persi
stent
type default min max usage
ALP_Column_FocusableCheckboxboolno When set to true (1), a column displaying checkboxes or pictures is focusable as any other column type

Row properties

property constant read write persi
stent
type default min max usage
ALP_Row_Flagsint Style flags
2 = font name
4 = font size
8 = font style
16 = text color
32 = background color
64 = horizontal alignment-
128 = vertical alignment-
256 = wrap
512 = rotation
1024 = baseline shift
2048 = horizontal scale
4096 = line spacing
8192 = ellipsis
Properties not set are inherited from column
ALP_Row_UseEllipsisint-1-12Use ellipsis for data of this row
-1 = use area's default (ALP_Area_UseEllipsis)
0 = none
1 = on right side for left-aligned, centered otherwise
2 = on right side for left-aligned, on left side for right-aligned, centered otherwise
ALP_Row_RowDivColor color 0Override the area row divider color for this row
(bottom divider)
Cell options of last line are used (important when using multi-line grid)

Cell properties

property constant read write persi
stent
type default min max usage
ALP_Cell_Formattext Format
ALP_Cell_FormatResolved text Resolved 4D format (when format uses “Format”)
ALP_Cell_Flagsint Style flags (properties not set are inherited from row and then from column)
2 = font name
4 = font size
8 = font style
16 = text color
32 = background color
64 = horizontal alignment
128 = vertical alignment
256 = wrap
512 = rotation
1024 = baseline shift
2048 = horizontal scale
4096 = line spacing
8192 = ellipsis
ALP_Cell_UseEllipsisint-1-12Use ellipsis for data of this cell
-1 = use area's default (ALP_Area_UseEllipsis)
0 = none
1 = on right side for left-aligned, centered otherwise
2 = on right side for left-aligned, on left side for right-aligned, centered otherwise
ALP_Cell_RowDivColor color 0Override the area row divider color for this cell
(bottom divider)
Cell options of last line are used (important when using multi-line grid)

Object properties

property constant read write array
type
usage
ALP_Object_AutoHierarchyintColumn numbers for automatic hierarchy
Set auto hierarchy to use these column(s) for break processing and hierarchy
ALP_Object_AltHdrGridintAlternate header grid (see grid manipulation in the v9 manual, chapter 11 “Advanced Topics”)
Usable with AL_Get/SetObjectsX

Break properties

property constant read write persi
stent
type default min max usage
ALP_Break_HeaderCalcMethod text Method to call for Break Header cell
FUNCTION evaluation
See PL_SetBkHFunc
ALP_Break_FooterCalcMethod text Method to call for Break Footer cell
FUNCTION evaluation
See PL_SetBrkFunc
ALP_Break_HideDetails boolno See PL_SetColOpts
ALP_Break_RowID To be used with break row/cell properties: break footer 0 uses row -4, break header 0 uses -5, break footer 1 uses -6, …
ALP_Break_NumRowLinesint1164See PL_SetBrkHeight/PL_SetBkHHeight
ALP_Break_MinRowHeightreal00256
ALP_Break_RowIndentpoint3;1 Pair of reals separated with semicolon (horizontal;vertical)
See PL_SetBrkHeight/PL_SetBkHHeight
ALP_Break_RowIndentHreal3064
ALP_Break_RowIndentVreal1064
ALP_BreakCell_Sourceint Data source (column number) for the break cell (default is inherited from the data grid)
ALP_BreakCell_Valuetext Alias to ALP_Cell_Value for the break cell
ALP_BreakCell_ColSpanint Column span of the break cell grid
ALP_BreakCell_RowSpanint Row span of the break cell grid
ALP_Break_LineShowColumnDividerbool
ALP_Break_LineThicknessreal002Range is 0.0 - 1.0 or 2.0
ALP_Break_LineColorcolor
ALP_Break_Clear n/a Clear the break(s)
Break processing example with AreaList Pro
	AL_SetAreaLongProperty ($1;ALP_Area_AutoHierarchy;1)  //Break on company name, create hierarchy
	AL_SetBreakTextProperty ($1;0;1;1;ALP_BreakCell_Value;"Total code for \\BreakValue")
	AL_SetBreakLongProperty ($1;0;1;1;ALP_BreakCell_ColSpan;3)  // span 3 columns
	AL_SetBreakLongProperty ($1;0;1;13;ALP_BreakCell_Source;14)  // use column 14 as source
	AL_SetBreakLongProperty ($1;0;1;13;ALP_BreakCell_ColSpan;2)  // span 2 columns
	AL_SetBreakTextProperty ($1;0;1;13;ALP_BreakCell_Value;"\\SUM")
	AL_SetBreakTextProperty ($1;0;0;1;ALP_BreakCell_Value;"TOTAL")
	AL_SetBreakLongProperty ($1;0;0;13;ALP_BreakCell_Source;14)
	AL_SetBreakLongProperty ($1;0;0;13;ALP_BreakCell_ColSpan;2)
	AL_SetBreakTextProperty ($1;0;0;13;ALP_BreakCell_Value;"\\SUM")

This makes the first cell in the break footer to span 3 columns (to display the whole value) and moves the total from column 14 to column 13 (it can be wide).
In other words, AL_SetBreakTextProperty ($1;0;1;14;ALP_BreakCell_Value;“\\SUM”) alone is enough to make cell 14 contain sum for column 14.
But if you want it in cell 13, you must set the cell source column to 14 (otherwise it would reference column 13 and it would use sum for column 13, not 14).

arealist_pro_v10_new_properties.txt · Last modified: 2019/06/14 17:13 by alp_admin