tablesearch()
Description
This function provides a pick list functionality implemented using a dialog
and a grid control. Once the user selects a row from the grid and clicks
on OK, then the valuefield
of the selected record
will be returned to the caller as the function return value. It also
includes an optional whereclause
parameter, though
it may only be applied to the database table associated with the
valuefield
parameter. The
dispfields
contains the field names for the fields
that should be dislayed and are listed by name separated by semi-colons.
The column widths can be specified in the
colwidths
parameter as a semi-colon-separated
list. They will be applied in the order received, just like the display
fields. To make it easier to establish the best column widths, set the
showcolwidths
parameter to
.true
and the column widths will be displayed. This is
very useful during development.
Prototype
tablesearch
(
type(wxdialogparent)
,
integer parent
,
integer width
,
type(db1field) height
,
type(db1index) valuefield
,
string orderidx
,
string whereclause
,
string dlgtitle
,
string searchcap
,
string OKtext
,
string canceltext
,
string readytext
,
string workingtext
,
string dispflds
,
string colwidths
,
string defboolean
,
string definteger
,
string defnumber
,
string defdate
,
string deftime
,
SBLlocaledateinfo defdatetime
,
SBLNumSettings datelocale
,
boolean numlocale
,
boolean showcolwidths
,
integer allowcolwidthdrag
)
error
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
parent | None | type(wxdialogparent) | |
width | None | integer | |
height | None | integer | |
valuefield | None | type(db1field) | |
orderidx | None | type(db1index) | |
whereclause | None | string | |
dlgtitle | None | string | |
searchcap | None | string | |
OKtext | None | string | |
canceltext | None | string | |
readytext | Ready. | string | |
workingtext | Working... | string | |
dispflds | None | string | |
colwidths | None | string | |
defboolean | T|F | string | |
definteger | . | string | |
defnumber | 999999.00 | string | |
defdate | yyyy.0m.0d | string | |
deftime | hh:mm:ss | string | |
defdatetime | yyyy-mm-dd hh:mm:ss.nnnnnn | string | |
datelocale | None | SBLlocaledateinfo | |
numlocale | None | SBLNumSettings | |
showcolwidths | .false | boolean | |
allowcolwidthdrag | .true | boolean | |
error | None | integer |