Index | Parent | NList class |
The NList class is used to manipulate lists.
A NList object is not a NListview: it is the list that the NListview will render.
A NList object can only be added to a NListview object at NListview creation time.
NList class is a subclass of NList.mcc, so you must have NList.mmc in MUI:Libs/MUI to use it. Nlist.mcc is copyright of Gilles Masson.
See NListview.
Attributes | |||
---|---|---|---|
Name | Type | Class | Note |
Active | M | ISGN G2N | A number or one of:
|
ActiveEntry | S | N | As Active, but represents the contents of the entry |
ActiveEntry0 | S | N | The contents of the column number 0 of the active entry |
ActiveEntry1 | S | N | |
ActiveEntry2 | S | N | |
ActiveEntry3 | S | N | |
ActiveEntry4 | S | N | |
ActiveEntry5 | S | N | |
ActiveEntry6 | S | N | |
ActiveEntry7 | S | N | |
ActiveEntry8 | S | N | |
ActiveEntry9 | S | N | |
AdjustHeight | B | I | |
AdjustWidth | B | I | |
AutoCopyToClip | B | IS | |
AutoVisible | B | ISG | |
ButtonClick | N | GN | |
Case | B | I | Set case comparation mode (0 is the default) |
ClickColumn | N | G | |
DefaultInsertPos | M | IS | A number or one of:
|
DefaultObjectOnClick | B | IS | |
DefClickColumn | N | ISG | |
DoubleClick | N | GN | |
DragColOnly | N | SG | |
DragSortable | B | ISG | |
DragSortInsert | B | GN | |
DragType | S | ISG G2N | One of:
|
DropMark | N | G | |
DropType | N | G | |
Entries | N | GN | |
EntryClick | N | GN | |
First | M | ISGN G2N | A number or one of:
|
ForcePen | N | ISGN | |
Format | S | ISG | |
HorizDeltaFactor | N | GN | |
HorizEntries | N | GN | |
HorizFirst | N | SGN | |
HorizVisible | N | GN | |
Image | S | I | See Images in lists |
Input | B | ISG | |
InsertPosition | N | GN | |
LineHeight | N | GN | |
List | S | I | A name of an ARexx stem where to read entries |
ListviewTabSize | N | ISGN | |
MinColSortable | N | ISG | |
MinLineHeight | N | IS | |
MultiClick | N | GN | |
MultiClickAlone | N | GN | |
MultiSelect | S | I | |
Names | S | I | A string of entries separated by a , |
NumSelected | N | G | The number of the selected entries |
NumSort | B | ISGN | Sets numeric comparation mode (0 is the default) |
PropDeltaFactor | N | GN | |
PropEntries | N | GN | |
PropFirst | N | SGN | |
PropVisible | N | GN | |
Quiet | B | SG | |
SelectChange | B | N | |
Separator | C | I | The char to be used as columns separator in a multi column list. Default: | |
ShowDropMark | B | ISG | For compatibility reasons, use ShowDropMarks |
ShowDropMarks | B | ISG | |
SortFormat | S | ISG | Here you may specify a sort Format String to control some
sorting options. The string may contain one entry for each
column of the list. Entries are seperated by commas; easch entry is parsed via dos.library/ReadArgs().
The template for a single entry is C=COL/K/N,NUM/S,CASE/S where:
Let's suppose you created a List with 3 col, First, Second and Third, where First is to be nocase-sorted, Second is to be case-sorted and Third is to be num-sorted, just set (init) SortFormat to "CASE,,NUM" |
SortType | M G2N | ISGN | Specify the primary sort type and order. When set it is a string to parse with the
template OFF/S,COL/K/N,REV/S, where
|
SortType2 | M G2N | ISGN | Specify the second sort type and order. When set it is a string to parse with the
template OFF/S,COL/K/N,REV/S, where
|
Title | S | IS | |
TitleClick | N | ISGN | |
TitleClick2 | N | ISGN | |
TitleMark | N | ISG | |
TitleMark2 | N | ISG | |
Visible | N | N | |
WrapCol | N | I |
Methods | ||
---|---|---|
Name | Parameters | Note |
AddStem | <stemName/V>,[pos] | Add the entries defined in stem to the list. mode is one of:
|
Clear | Clear the list | |
ClearAddStem | <stemName/V>,[pos] | As AddStem, but clear the list before adding the entries<./td> mode is one of:
|
Exchange | <entry1>,<entry2> | Exchange 2 entries entry1 is a number or one of:
entry2 is a number or one of:
|
GetEntries | <stem> | The method writes in stem.num the number of the entries and in stem.0,... stem.i
(i=stem.num-1) the entries: DoMethod("list","GetEntries","entries") do i=0 to entries.num-1 say entries.i end |
GetEntry | <pos>,<var> | Get an entry pos is a number or Active |
GetSelected | <stem> | The method writes in stem.num the number of the selected entries and in stem.0,...
stem.i (i=stem.num-1) the entries: do i=0 to sel.num-1 say sel.i end |
GetSortType | <var/V> | Get the human form of SortType value. If you read SortType, you get an integral number, the format of which is not even compatible with ARexx integral numbers. This methods writes in var the SortType string. See Insertion and Sorting |
GetSortType2 | <var/V> | Get the human form of SortTypes value. If you read SortTypes, you get an integral number, the format of which is not even compatible with ARexx integral numbers. This methods writes in var the SortTypes string. See Insertion and Sorting |
Insert | <entry>, [pos] | Insert an entry. pos is a number or one of:
|
InsertWrap | <entry>,[pos],[wrapcol],[align] | Insert an entry. pos is a number or one of:
wrapcol is a number or one of:
align is a number or one of:
|
Jump | [pos] | Jump to an entry, making it visible pos is a number or one of:
|
Remove | [pos] | Remove an entry pos is a number or:
|
ReplaceCol | <pos>,<col>,<value> | Replace the col column of the pos entry with value pos is a number or Active |
Select | [pos],[type],[var/S] | Select entries. pos is a number or one of:
val is a number or one of:
If type is Ask the third argument must be supplied and must be a valid ARexx var name: it will contain the number of the selected entries. |
Sort | Sort the entries of the list | |
Sort2 | <type>,<add> | Sort the entries of the list add is a number or one of:
Many times this method will be used to sort multicolumn list when the user click on title buttons: call Notify("list","TitleClick", "Everytime","list","Sort2","TriggerValue", "Add2Values") |
Sort3 | <type>,<add>,<which> | Sort the entries of the list add is a number or one of:
which is a number or one of:
|
Insertion means adding entries at init time and adding entries with AddStem and ClearAddStem methods.
Insertion is ruled by the following attributes:
At init time, if DefaultInsertPos is specified and it is not Default, entries are inserted at the position there specified, otherwise if DragSortable is 1, entries are inserted Sorted, otherwise entries are inserted at the bottom.
The above applies as well, when adding entries with AddStem and ClearAddStem.
Sorting is ruled by the following attributes:
SortType specifies the main sorting criterium: no sort, the number of the column that rules the sort, a reverse order.
If SortType cannot decide the order of two entries, SortType2 is used: it specifies a secondary sorting criterium; it has the same values of SortType, but regarding a different column.
SortFormat specifies options for each column of the list.
Note that SortType and SortType2 default values are OFF. It means that no sorting applies and entries are inserted not sorted (usually at the bottom), despite the value of DefaultInserPos.