A lot of new things:
- Login() / Logout().
- CheckBox.
- ComboBox.
- Window function renamed to Form.
- All widgets have methods now.
- cId and cParentId parameters eliminated for easier use (only oParent needed now).
- Eliminated contributed code, since the internal library changes turned unusable.
This is the updated reference:
Code: Select all
HMGSCRIPT 2012 FUNCTION REFERENCE (R022)
----------------------------------------
FORM:
-----
Element: DIV
You can use all the properties, events and methods availables for it via DOM.
Syntax:
Form( cCaption , nWidth , nHeight )
Methods:
- release( cValue )
- getId()
Example:
oWin = new Form ( "Window Demo", 600 , 300 );
oWin.release()
------------------------------------------------------------------------------------------------
BUTTON:
-------
Element: INPUT (Type: BUTTON)
You can use all the properties, events and methods availables for it via DOM.
Syntax:
Button( oParent , nRow , nCol , cCaption , cOnClick )
Methods:
- setValue( cValue )
- getValue()
- getId()
Example:
oBtn = new Button( oForm ,
50 , 240 ,
"Set Btn Value" ,
"oBtn.setValue('New Value')" );
------------------------------------------------------------------------------------------------
LABEL:
------
Element: SPAN
You can use all the properties, events and methods availables for it via DOM.
Syntax:
Label( oParent , nRow , nCol , cValue )
Methods:
- getId()
------------------------------------------------------------------------------------------------
TEXTBOX:
--------
Element: INPUT (Type: TEXT)
You can use all the properties, events and methods availables for it via DOM.
Syntax:
TextBox( oParent , nRow , nCol , cValue )
Methods:
- setValue( cValue )
- getValue()
- getId()
Example:
oText = new TextBox( oForm , 130, 230, "TextBox!" );
alert( oText.getValue() );
------------------------------------------------------------------------------------------------
CHECKBOX:
---------
Element: INPUT (Type: CHECKBOX)
You can use all the properties, events and methods availables for it via DOM.
Syntax:
CheckBox( oParent , nRow , nCol , bChecked )
Methods:
- check()
- unCheck()
- isChecked()
- getId()
Example:
oCheck = new CheckBox( oForm , 140 , 280 , true );
alert(oCheck.isChecked())
oCheck.check()
oCheck.unCheck()
------------------------------------------------------------------------------------------------
COMBOBOX:
---------
Element: SELECT
You can use all the properties, events and methods availables for them via DOM.
Syntax:
ComboBox( oPArent , nRow , nCol , aText , aValues )
Methods:
- getValue( nIndex )
- setValue( nIndex , cValue )
- setSelectedIndex ( nIndex )
- getSelectedIndex()
- getId()
Example:
oConbo = new ComboBox( oForm , 140 , 270 ,
[ 'one' , 'two' , 'three' ] ,
[ 'value one' , 'value two' , 'value three' ] );
alert ( oConbo.getSelectedIndex() );
------------------------------------------------------------------------------------------------
IMAGE:
------
Element: IMAGE
You can use all the properties, events and methods availables for it via DOM.
Syntax:
Image( oParent , nRow , nCol , cSrc )
Methods:
- getId()
------------------------------------------------------------------------------------------------
PANEL:
------
Element: DIV
You can use all the properties, events and methods availables for it via DOM.
Syntax:
Panel( oParent , nRow , nCol , nWidth , nHeight , cValue )
Methods:
- getId()
------------------------------------------------------------------------------------------------
APPEND:
-------
Appends a record.
Syntax:
Append( cTable , aColumns , aValues )
------------------------------------------------------------------------------------------------
DELETE:
-------
Delete records matching the cForExpr.
Syntax:
Delete( cTable , cForExpr )
------------------------------------------------------------------------------------------------
MODIFY:
-------
Modifies records matching the cForExpr.
Syntax:
Modify( cTable , aColumns , aValues , cForExpr )
------------------------------------------------------------------------------------------------
LOGIN:
------
Syntax:
Login( cUser , cPassword )
------------------------------------------------------------------------------------------------
LOGOUT:
-------
Syntax:
Logout()
------------------------------------------------------------------------------------------------
BROWSE:
-------
Elements: DIV/TABLE
Creates an HTML table inside a scrollable DIV, loaded with the specified dbf query.
Syntax:
Browse( oParent , nRow, nCol, nWidth, nHeight, cDbfFile, aColumns,
aHeaders , cForExpr , cOrder )
Methods:
- refresh()
- getSelectedRows()
- getRowCount()
- select()
- unSelect()
- getCell(nRow,nCount)
- getSelectedRowCount()
- getId()
Example:
oBrowse = new Browse( oParent , 050 , 050 , 550 , 300 ,
'test' , [ 'code' , 'first' , 'last' , 'birth' , 'married' ] ,
[ 'Code' , 'First' , 'last' , 'Birth' , 'Married' ] ,
'code < 100' ,
'code' );
oBrowse.refresh()
------------------------------------------------------------------------------------------------