SIMPOL Documentation

Chapter 26. databaseforms

Table of Contents

The databaseforms library is the implementation of data-aware display and print forms for SIMPOL. The dataform1 family of objects are a wrapper around the wxform* objects and the printform1 family of objects are a wrapper around the print architecture supplied by the WXWN component. The databaseforms library provides a multi-page, data-aware layer that includes the data-aware bitmap, data-aware scrollbar, data-aware grid, and detail block implentations, among others. It also provides the grouping mechanism for option buttons. This library is key to efficiently creating database-aware GUIs using SIMPOL. One significant difference between dataform1* and the native wxform* types is the use of drings in dataform1 for collections of objects. To traverse a dring use the dring.getfirst() to retrieve the first object, and then the getnext() method of the appropriate node property of the object to get to the next.

dataform1

Description

Type Tags

dataform1linkcontainer, dataform1

Object Value

Objects of type dataform1 have no value, and it is an error to try to get or set this value.

dataform1.new()

Description

Prototype

dataform1.new ( dataform1 me, integer defpagewidth, integer defpageheight, integer defpagebackcolor, string defbooleanformat, string defintegerformat, string defnumberformat, string defdateformat, string deftimeformat, string defdatetimeformat, SBLlocaledateinfo defdatelocale, SBLNumSettings defnumericlocale, wxfont deffont, integer designdpi, string currentworkingdirectory, boolean loading, integer error )

Parameters

ParameterDefault valueType nameDescription
meNonedataform1
defpagewidth50integer
defpageheight50integer
defpagebackcolor16777215integer
defbooleanformatT|Fstring
defintegerformat.string
defnumberformat999999.00string
defdateformatyyyy.0m.0dstring
deftimeformathh:mm:ssstring
defdatetimeformatNonestring
defdatelocaleNoneSBLlocaledateinfo
defnumericlocaleNoneSBLNumSettings
deffontNonewxfont
designdpi96integer
currentworkingdirectoryNonestring
loading.falseboolean
errorNoneinteger

Properties

PropertyTypeDescription
_type(*)
__type(*)
_privatedataform1private
addbitmapfunction
addcontrolfunction
adddatasourcefunction
adddetailblockfunction
addgraphicfunction
addlinkfunction
addoptiongroupfunction
addpagefunction
addsiblinglinkfunction
addtablefunction
assignfilterobjectfunction
autolockingboolean
bitmapsdring
blankfunction
checkdirtyrecordsfunction
clearlinksfunction
clearsiblinglinksfunction
containertype(wxcontainer)
controlsdring
currentdpiinteger
currentpagedataform1page
currentworkingdirectorystring
datasourcesdring
defbooleanformatstring
defdateformatstring
defdatelocaleSBLlocaledateinfo
defdatetimeformatstring
deffontwxfont
defintegerformatstring
defnumberformatstring
defnumericlocaleSBLNumSettings
defpagebackcolorinteger
defpageheightinteger
defpagewidthinteger
deftimeformatstring
deleterecordfunction
designdpiinteger
designmodeboolean
detailblocksdring
dirtyboolean
discardrecordfunction
dpiadjfactornumber
duplicaterecordfunction
filenamestring
filllistsfunction
filterdataform1filter
findbitmapsourcefunction
findcontrolfunction
finddatasourcefunction
findgraphicfunction
findnextfocusablecontrolfunction
findsiblinglinkfunction
findtablefunction
fontsarray
getfieldandtablefunction
getfontfunction
getlinkedrecordfunction
graphicsdring
lastusedrecorddataform1record
linksdring
loadingboolean
lockfunction
lockedboolean
masterrecorddataform1record
mastertabledataform1table
namestring
nameinusefunction
newrecordfunction
obgroupsdring
onchangerecordevent
ondeleteevent
ondiscardevent
onkeyevent
onkeylostfocusevent
onnewrecordevent
onsaveevent
onselectevent
pagesdring
preventfocusboolean
preventfocusmodeboolean
refreshfunction
saverecordfunction
selectcurrentfunction
selectfirstfunction
selectkeyfunction
selectlastfunction
selectnextfunction
selectpreviousfunction
setcontainerfunction
setdirtystatefunction
setfilterfunction
setkeyfocusfunction
setlastusedrecordfunction
setmasterrecordfunction
setmastertablefunction
showpagefunction
siblinglinksdring
tablesdring
typetype
unlockfunction
validboolean

Methods

!()

Description

Prototype

dataform1var.! ( dataform1 me, string controlname )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
controlnameNonestring

addbitmap()

Description

Prototype

dataform1var.addbitmap ( dataform1 me, string filename, string format, blob rgb, integer width, integer height, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
filenameNonestring
formatxpmstring
rgbNoneblob
widthNoneinteger
heightNoneinteger
errorNoneinteger

addcontrol()

Description

Prototype

dataform1var.addcontrol ( dataform1 me, type controltype, integer left, integer top, integer width, integer height, string text, boolean enabled, boolean visible, wxbitmap bitmap, string scaling, wxbitmap selectedbitmap, wxbitmap disabledbitmap, wxbitmap focusbitmap, integer backgroundrgb, integer textrgb, integer rgb, string edittype, string selectiontype, integer rowcount, integer colcount, integer rowheight, integer colwidth, boolean rowheightdraggable, boolean colwidthdraggable, integer rowlabelwidth, integer collabelheight, string rowlabelalignment, string collabelalignment, string alignment, string editstyle, string orientation, integer range, integer position, integer pagesize, integer thumbsize, wxfont font, wxfont labelfont, string tooltip, integer onmousemask, string name, type(dataform1control) next, dataform1page page, anyvalue valueon, anyvalue valueoff, type(db1field) field, dataform1table table, string displayformat, dataform1optiongroup obgroup, boolean suppressfill, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
controltypeNonetype
leftNoneinteger
topNoneinteger
widthNoneinteger
heightNoneinteger
textNonestring
enabled.trueboolean
visible.trueboolean
bitmapNonewxbitmap
scalingNonestring
selectedbitmapNonewxbitmap
disabledbitmapNonewxbitmap
focusbitmapNonewxbitmap
backgroundrgbNoneinteger
textrgb0integer
rgbNoneinteger
edittypedropliststring
selectiontypesinglestring
rowcount1integer
colcount1integer
rowheight20integer
colwidth80integer
rowheightdraggable.trueboolean
colwidthdraggable.trueboolean
rowlabelwidth80integer
collabelheight20integer
rowlabelalignmentrightstring
collabelalignmentleft,topstring
alignmentleft,topstring
editstyleNonestring
orientationNonestring
range1integer
position0integer
pagesize1integer
thumbsize1integer
fontNonewxfont
labelfontNonewxfont
tooltipNonestring
onmousemask0integer
nameNonestring
nextNonetype(dataform1control)
pageNonedataform1page
valueonNoneanyvalue
valueoffNoneanyvalue
fieldNonetype(db1field)
tableNonedataform1table
displayformatNonestring
obgroupNonedataform1optiongroup
suppressfill.falseboolean
errorNoneinteger

adddatasource()

Description

Prototype

dataform1var.adddatasource ( dataform1 me, type(*) datasource, string source, string username, string password, integer codepage, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
datasourceNonetype(*)
sourceNonestring
usernameNonestring
passwordNonestring
codepageNoneinteger
errorNoneinteger

adddetailblock()

Description

Prototype

dataform1var.adddetailblock ( dataform1 me, dataform1page page, array controls, integer rows, integer rowoffset, integer columns, integer columnoffset, string scrollbar, integer scrollbaroffset, boolean tabacross, string name, boolean readonly, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
pageNonedataform1page
controlsNonearray
rows1integer
rowoffset30integer
columns1integer
columnoffset200integer
scrollbarrightstring
scrollbaroffset15integer
tabacross.trueboolean
nameNonestring
readonly.trueboolean
errorNoneinteger

addgraphic()

Description

Prototype

dataform1var.addgraphic ( dataform1 me, type graphictype, point point1, point point2, point point3, point midpoint, integer rgb, integer borderrgb, integer width, integer borderwidth, boolean visible, boolean bordervisible, string name, type(dataform1graphic) next, dataform1page page, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
graphictypeNonetype
point1Nonepoint
point2Nonepoint
point3Nonepoint
midpointNonepoint
rgbNoneinteger
borderrgbNoneinteger
widthNoneinteger
borderwidthNoneinteger
visibleNoneboolean
bordervisibleNoneboolean
nameNonestring
nextNonetype(dataform1graphic)
pageNonedataform1page
errorNoneinteger

addlink()

Description

Prototype

dataform1var.addlink ( dataform1 me, type(db1field) srcfield, dataform1table srctable, type(db1field) destfield, dataform1table desttable, type(dataform1linkcontainer) container, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
srcfieldNonetype(db1field)
srctableNonedataform1table
destfieldNonetype(db1field)
desttableNonedataform1table
containerNonetype(dataform1linkcontainer)
errorNoneinteger

addoptiongroup()

Description

Prototype

dataform1var.addoptiongroup ( dataform1 me, string name, type(db1field) field, dataform1table table, string displayformat, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
nameNonestring
fieldNonetype(db1field)
tableNonedataform1table
displayformatNonestring
errorNoneinteger

addpage()

Description

Prototype

dataform1var.addpage ( dataform1 me, integer width, integer height, integer backgroundrgb, dataform1page after, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
widthNoneinteger
heightNoneinteger
backgroundrgbNoneinteger
afterNonedataform1page
errorNoneinteger

addsiblinglink()

Description

Prototype

dataform1var.addsiblinglink ( dataform1 me, type(db1field) srcfield, dataform1table srctable, type(db1field) destfield, dataform1table desttable, type(dataform1linkcontainer) container, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
srcfieldNonetype(db1field)
srctableNonedataform1table
destfieldNonetype(db1field)
desttableNonedataform1table
containerNonetype(dataform1linkcontainer)
errorNoneinteger

addtable()

Description

Prototype

dataform1var.addtable ( dataform1 me, type(db1table) table, dataform1datasource source, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
tableNonetype(db1table)
sourceNonedataform1datasource
errorNoneinteger

assignfilterobject()

Description

Prototype

dataform1var.assignfilterobject ( dataform1 me, dataform1filter dffilter )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
dffilterNonedataform1filter

blank()

Description

Prototype

dataform1var.blank ( dataform1 me, boolean datacontrolsonly )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
datacontrolsonly.trueboolean

checkdirtyrecords()

Description

Prototype

dataform1var.checkdirtyrecords ( dataform1 me )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1

clearlinks()

Description

Prototype

dataform1var.clearlinks ( dataform1 me )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1

clearsiblinglinks()

Description

Prototype

dataform1var.clearsiblinglinks ( dataform1 me )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1

deleterecord()

Description

Prototype

dataform1var.deleterecord ( dataform1 me, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
errorNoneinteger

discardrecord()

Description

Prototype

dataform1var.discardrecord ( dataform1 me, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
errorNoneinteger

duplicaterecord()

Description

Prototype

dataform1var.duplicaterecord ( dataform1 me, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
errorNoneinteger

filllists()

Description

Prototype

dataform1var.filllists ( dataform1 me )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1

findbitmapsource()

Description

Prototype

dataform1var.findbitmapsource ( dataform1 me, string sourcename )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
sourcenameNonestring

findcontrol()

Description

Prototype

dataform1var.findcontrol ( dataform1 me, string controlname )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
controlnameNonestring

finddatasource()

Description

Prototype

dataform1var.finddatasource ( dataform1 me, string sourcename )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
sourcenameNonestring

findgraphic()

Description

Prototype

dataform1var.findgraphic ( dataform1 me, string graphicname )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
graphicnameNonestring

findsiblinglink()

Description

Prototype

dataform1var.findsiblinglink ( dataform1 me, dataform1table desttable )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
desttableNonedataform1table

findtable()

Description

Prototype

dataform1var.findtable ( dataform1 me, string tablename )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
tablenameNonestring

getfieldandtable()

Description

Prototype

dataform1var.getfieldandtable ( dataform1 me, string fieldname, string tablename )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
fieldnameNonestring
tablenameNonestring

getfont()

Description

Prototype

dataform1var.getfont ( dataform1 me, string facename, integer size, string style, string weight, string decoration )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
facenameNonestring
sizeNoneinteger
styleNonestring
weightNonestring
decorationNonestring

getlinkedrecord()

Description

Prototype

dataform1var.getlinkedrecord ( dataform1 me, dataform1table desttable )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
desttableNonedataform1table

lock()

Description

Prototype

dataform1var.lock ( dataform1 me, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
errorNoneinteger

nameinuse()

Description

Prototype

dataform1var.nameinuse ( dataform1 me, string controlname )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
controlnameNonestring

newrecord()

Description

Prototype

dataform1var.newrecord ( dataform1 me, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
errorNoneinteger

refresh()

Description

Prototype

dataform1var.refresh ( dataform1 me, boolean clearfocus )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
clearfocus.trueboolean

saverecord()

Description

Prototype

dataform1var.saverecord ( dataform1 me, boolean lock, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
lock.falseboolean
errorNoneinteger

selectcurrent()

Description

Prototype

dataform1var.selectcurrent ( dataform1 me, type(db1index) index, boolean lock, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
indexNonetype(db1index)
lock.falseboolean
errorNoneinteger

selectfirst()

Description

Prototype

dataform1var.selectfirst ( dataform1 me, boolean lock, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
lock.falseboolean
errorNoneinteger

selectkey()

Description

Prototype

dataform1var.selectkey ( dataform1 me, anyvalue value, type(db1index) index, boolean lock, boolean found, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
valueNoneanyvalue
indexNonetype(db1index)
lock.falseboolean
foundNoneboolean
errorNoneinteger

selectlast()

Description

Prototype

dataform1var.selectlast ( dataform1 me, boolean lock, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
lock.falseboolean
errorNoneinteger

selectnext()

Description

Prototype

dataform1var.selectnext ( dataform1 me, boolean lock, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
lock.falseboolean
errorNoneinteger

selectprevious()

Description

Prototype

dataform1var.selectprevious ( dataform1 me, boolean lock, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
lock.falseboolean
errorNoneinteger

setcontainer()

Description

Prototype

dataform1var.setcontainer ( dataform1 me, type(wxcontainer) container )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
containerNonetype(wxcontainer)

setdirtystate()

Description

Prototype

dataform1var.setdirtystate ( dataform1 me, boolean dirty )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
dirty.trueboolean

setfilter()

Description

Prototype

dataform1var.setfilter ( dataform1 me, string filter, string errtext, integer errindex )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
filterNonestring
errtextNonestring
errindexNoneinteger

setkeyfocus()

Description

Prototype

dataform1var.setkeyfocus ( dataform1 me, function onkey, type(*) onkeyreference, function onlostfocus, type(*) onlostfocusreference )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
onkeyNonefunction
onkeyreferenceNonetype(*)
onlostfocusNonefunction
onlostfocusreferenceNonetype(*)

setlastusedrecord()

Description

Prototype

dataform1var.setlastusedrecord ( dataform1 me, dataform1record record )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
recordNonedataform1record

setmasterrecord()

Description

Prototype

dataform1var.setmasterrecord ( dataform1 me, type(db1record) r, boolean dorefresh, boolean retaindetailblockpositions, integer error )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
rNonetype(db1record)
dorefresh.trueboolean
retaindetailblockpositions.falseboolean
errorNoneinteger

setmastertable()

Description

Prototype

dataform1var.setmastertable ( dataform1 me, dataform1table table )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
tableNonedataform1table

showpage()

Description

Prototype

dataform1var.showpage ( dataform1 me, integer pagenum, boolean clearfocus )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1
pagenumNoneinteger
clearfocus.trueboolean

unlock()

Description

Prototype

dataform1var.unlock ( dataform1 me )

Parameters
ParameterDefault valueType nameDescription
meNonedataform1