Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Objects of type windowinstance are individual representations of windows created based on a windowclass.

Window instances contain controls, as defined in the sheetdata section of the windowclass definition, or dynamically constructed using the createControl function.

Window contents, i.e. the data present in the data field controls, is determined by the instance's association with the database tree. A window instance can be tied to a particular database tree node or it can be unbound (in which case getDatabaseNode returns nil). The node the window is bound to is called the window data source. The controls in the window will get their data from a node under the data source (see databasecontrol for details). The controls in an unbound window are unbound by default.

...

name   (string)   
The name of the control. If the control is a databasecontrol and the window has a data source, it will be bound to the corresponding node in the database.

...

Code Block
languagelua
function getClass()

Returns the name of the windowclass resource used to construct the window.

Return values

(string)
The name of the windowclass this window instance represents.

...

(table)
An integer indexed table containing references to the windowcontrol-based objects in the window.

...

This function will return a reference to a databasenode object representing the data source database node for this window.

...

Returns the current positional lock state of the window instance. Only applies to windowinstance objects defined within panel tags.

Return values

(boolean)
Lock state of the panel windowinstance. If windowinstance is not embedded within a panel, then false.

...

dragdata   (dragdata)   
dragdata object containing the state of values connected to the mouse cursor as part of a drag and drop operation.

...

This function is called when the position lock state of this windowinstance changes. Only applies to windowinstance objects defined within panel tags.


onLockStateChanged

Code Block
languagelua
function onLockStateChanged ()

...

source   (windowinstance)   
The windowinstance causing the event.

onSizeChanged

...

source   (windowinstance)   
The windowinstance causing the event.

onSubwindowInstantiated

...

If present, this function is called if the window instance is contained in a subwindow. This will be called after onInit

...

Sets whether the given panel window instance is enabled to accept mouse and keyboard events. Only applies to windowinstance objects defined within panel tags.

Parameters

enable   (bool)   
Desired event enabling state.

...

Sets the positional lock state of the window instance. Only applies to windowinstance objects defined within panel tags.

Parameters

lock   (boolean)   
Desired lock state for panel windowinstance.

...