|
|
|
|
|
- What is an element?
- Handling an element
- Handling a second-level element
- Special cases: Data file or query fields
- Handling a third-level element
- Special Cases: Menu Options
- Retrieving the name of an element in the code
- Overview
- Retrieving the name of an element by Drag and Drop
Referring to an element in a WLanguage event / process
The table below presents the different elements found in an application: | | | Element | Second-level element | Third-level element |
---|
Window | - Window controls
- Window menus
- Cells of a status bar
| - Controls belonging to a supercontrol or to a toolbar
- Menu options
- Table columns
| Page Frameset | | Table columns | Report | - Report controls
- Report blocks
| Table columns | Query | Query items | | Data file | Items of a data file | |
The menu options and the items found in a data file are handled differently. For more details, see Special case: Headings and Special case: Menu options. To handle a page, window, report, query or data file in a WLanguage event or process, simply use the name of this element. This name can be used: - in a WLanguage function.
- with a WLanguage property.
- in direct assignment.
For example:
HExecuteQuery(REQ_ListeClient)
ETAT_Client.NbCopie =10
ResTitre is string = FEN_FenRecherche
ResTitre is string = PAGE_PageRecherche
Handling a second-level element To handle a second-level element (control or menu of a window/page, control or block of a report, etc.) in a WLanguage event or process, simply: - use the name of this second-level element directly. This syntax is valid only if this second-level element is handled from the window (or from the report) to which it belongs.
- or use the following notation: "<NomElément>.<NomElément2°Niveau>".
A second-level element can be handled: - in a WLanguage function.
- with a WLanguage property.
- in direct assignment.
For example:
ComboOpen(COMBO_VilleFrance)
ChTotalHT.CouleurFond = LightBlue
FEN_Client.SAI_Ville = "Montpellier"
LooperDisplay(ZR_ZoneProduit, taStart)
Special cases: Data file or query fields To handle an item in a data file or query through programming, simply: - use the name of the item directly. This syntax is valid only if the item is handled by a function or by a property into which the name of the data file or the name of the query to which the item belongs is specified.
- or use the following syntax: "<NomFichier/NomRequête>.<NomRubrique>".
For example:
CLIENT.CP = SAI_CodePostal
HReadFirst(CLIENT, NOMCLI)
HForward(CLIENT, NOMCLI, 1999)
Handling a third-level element To handle a third-level element (control within a supercontrol, toolbar, table column, etc.) in a WLanguage event or process, simply: - use the name of this third-level element directly. This syntax is valid only if the following conditions are fulfilled:
- this third-level element is handled from the second-level element to which it belongs (supercontrol, toolbar or table).
- no other third-level element uses the same name.
- use the following notation if the 3rd level element is manipulated from the window (or state) to which it belongs: "<NomElément2°Niveau>.<NomElément3°Niveau>".
- or use the following notation if the 3rd level element is manipulated from another window (or another state): "<NomElément>.<NomElément2°Niveau>.<NomElément3°Niveau>".
A third-level element can be handled: - in a WLanguage function.
- with a WLanguage property.
- in direct assignment.
For example:
COL_NomClient.Largeur += 10
SC_SchStyle.SAI_Police.Taille += 10
FEN_Client.BAR_Style.SAI_Police.Hauteur += 10
Retrieving the name of an element in the code Overview To retrieve the name of an element (regardless of its level) in the code: - use the automatic completion.
The automatic completion proposes an assisted input of the WLanguage code. For more details, see Automatic completion. - perform Drag and Drop operations between the element to use and the code window.
These Drag and Drop operations can be performed:
Retrieving the name of an element by Drag and Drop To retrieve the name of an element by Drag and Drop: - Select the element whose name must be retrieved:
- Keep the left mouse button down while moving the element:
- Release the mouse button at the location where the name of the element should be used. The name of the dropped element is displayed.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|