- Binding between a control and a WLanguage variable or between a control and an item of a data file
- Binding to an item: types of bindings
In french: SourceVersEcran
Not available with this kind of connection
Automatically updates the controls in a window or page with:
- the values of the bound items in the current record (loaded in memory) of the HFSL data file described in the data model editor. This operation is performed regardless of the state of the controls (grayed, inactive or invisible).
- the values of the bound WLanguage variables. This operation is performed regardless of the state of the controls (grayed, inactive or invisible).
does not read records on the data file. The value of the record loaded in memory is used to update the controls. Therefore, a record must be loaded in memory previously:
HReadSeekFirst(CUSTOMER, NAME, "PAUL")
IF HFound() = True THEN
// Read the record and
// update the controls with the values from the items
SourceToScreen([<Window> [, <Source>]])
<Window>: Window name
Name of the window or page containing the controls to be updated.
Summary: Called when a control gains focus.
<Source>: Optional character string
Name (in quotation marks) of the source the controls to be updated are bound to. This source can be:
If this name is not specified, all the window controls bound to an item of a data file described in the data model editor or to a WLanguage variable will be taken into account.
- The name of a data file: only the controls bound to the items of the data file are taken into account.
- The name of a WLanguage variable: only the controls bound to the WLanguage variable are taken into account.
- If the name of the variable is enclosed in quotes, the control will be bound to the specified variable.
- If the name of the variable is not enclosed in quotes, the control will be bound to the variable data (e.g., a variable containing the name of another variable).
Binding between a control and a WLanguage variable or between a control and an item of a data file
The binding between a control and a WLanguage variable or between a control and an item of a data file can be determined:
- In the editor, in the control description window ("Binding" tab).
- Programmatically, with the DataBinding property.
Binding to an item: types of bindings
There are two types of bindings between a control and an item
- direct binding: In this case, SourceToScreen transfers the value of the items from the record loaded in memory to the bound control, without reading any values.
- binding by reading the records in the associated data file.
- Auto-filled Combo Box control bound to an HFSQL data file: SourceToScreen must not be in the window "Global declarations" event. The function must be in the "Initializing" event of the window.
- Space characters in HFSQL items are kept.
- SourceToScreen updates Image controls with the value of the bound image memo items.
- SourceToScreen supports the NULL value. If the item content is NULL, an empty string will be displayed in the bound Edit control. To modify this display mode, use ControlError.
- SourceToScreen is not available on views. The values of the items must be assigned to each control.
- Binding with "Secure Password" items:
- In an Edit control bound to a Password item, "*****" characters are displayed. If the Edit control is of type "Password", dots are displayed instead.
- The value of the "Password" item cannot be read again until the user changes the password value.
- The value of the "Password" item can still be compared to a string (e.g., "" or "1234").
This page is also available for…