Usage / Programming with DIALOG |
The DISPLAY ARRAY and INPUT ARRAY blocks support the built-in find feature by default. This feature creates the implicit find and findnext actions. These actions can be decorated, enabled and disabled as regular actions.
When the user triggers the find action (default accelerator is Ctrl-F), the dialog opens a popup window to let the user enter a search value. On validation with the OK button, the dialog starts to search a row where a field value matches the value entered in the find dialog. After a first search, the user can trigger the findnext action (default accelerator is Ctrl-G), in order to continue the search in the rest of the record list, without opening the find dialog again (the current search value will be reused).
The value entered in the find dialog is compared to all fields of visible columns, except columns of the type TEXT or BYTE. The comparison is based on the formatted value. For example, a MONEY column will display values formatted with the currency symbol. To match values in that column, the end user must enter exactly the same value (i.e. with the currency symbol and the correct decimal separator).
By default, any table column is scanned, but the user can select a specific column in the find dialog box, as long as a column title is available. Case-sensitive or insensitive search as well as wraparound options are also available.
Only text widgets displaying values are searched. Columns using special widgets such as Images, radio-groups, checkboxes, etc. are not searched.
Built-in find works with any list container (TABLE, TREE, SCROLLGRID).
Only rows in memory can be searched. When using the paged-mode (ON FILL BUFFER), the built-in search is disabled. When implementing dynamic tree views , the built-in find will only search the tree nodes available in the program array.
If the dialog defines an explicit ON ACTION find or ON ACTION findnext, the default built-in find is disabled.