ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Case of optional events
  • Case of events that expect parameters
  • Using the MySelf keyword
  • Exiting a sequence of procedures
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The Process property is used to modify the processes to be executed by the events available on a control, window, page, report, etc.
Several types of operations are available:
  • The '=' operator deletes all the processes and procedures attached to the event and replaces them with the specified procedure.
  • The '+=' operator adds the specified procedure after the initial process and after the procedures added beforehand.
  • The Before and After properties are used to manage the procedures to be executed more precisely.
  • To exit from the sequence of procedures, use SetFocusAndReturnToUserInput.
Example
// Specify the process to run on a click
BTN_BUTTON1.Process[trtClick] = myProcedure1

// Add a procedure to run on a click
BTN_BUTTON1.Process[trtClick] += myProcedure2

// Add a procedure to run before the click process
BTN_BUTTON1.Process[trtClick].Before += myProcedure3
Syntax
<Element>.Process [<Type of process>] = <Procedure name>
<Element>: Character string
Name of the element to be used:
  • Name of the control or name of the Control variable to use.
  • Name of the page to be used.
  • Name of the window to be used.
  • Name of the report to be used.
<Type of process>: Integer constant
Process to use:
trtActionAction code of the Web Component control.
trtAddDiagShapeCode executed when a shape is added in a Diagram Editor control.
trtAddKanbanCardCode executed when a card is added in a Kanban control.
trtAddTokenCode executed when a token is added in a "Text token" Edit control.
WEBDEV - Server code This constant is not available.
trtAddWidgetCode executed when a widget is added to a Dashboard control.
trtAfterChangingSkinTemplate"After changing skin template" code of an internal window.
WEBDEV - Server code This constant is not available.
trtAfterOpeningDocument"After opening a document" code of the Word Processing, Image Editor, Spreadsheet and PDF Reader controls.
WEBDEV - Server code This constant is not available.
trtBeforeChangingSkinTemplate"Before changing skin template" code of an internal window.
WEBDEV - Server code This constant is not available.
trtBeforeClosingDocument"Before closing a document" code of the Word Processing, Image Editor, Spreadsheet and PDF Reader controls.
WEBDEV - Server code This constant is not available.
trtBeforeClosingWindow"Allow closing" code.
WEBDEV - Server code This constant is not available.
trtBeforeCreatingOrganizerApt"Before creating the appointment" code of the Organizer control.
trtBeforeCreatingScheduleApt"Before creating the appointment" code of a Scheduler control.
trtChange
  • "Whenever modified" code of the control.
  • Code executed when the window is modified.
trtChangeDiagShapeCode executed when a shape is modified in a Diagram Editor control.
trtChangeLayout"Change of layout" code of a window.
WEBDEV - Server code This constant is not available.
trtChangeOrganizerPeriod"Whenever changing period" code of an Organizer control.
trtChangePlane"Whenever changing plane" code of a Sliding Banner control.
trtChangePositionMap"Whenever changing position" code of a Map control.
trtChangeSchedulePeriod"Whenever changing period" code of a Scheduler control.
trtChangeTokenCode executed when the user edits the text of a token in a "Text token" Edit control.
trtClick
  • Click code of the control.
  • Code of the button associated with the click in the window.
trtClickButtonArrowClick code on the arrow associated with a button.
WEBDEV - Server code This constant is not available.
trtClickButtonEditControlLeft"Click on the left button" code of the Edit control.
WEBDEV - Server code This constant is not available.
trtClickButtonEditControlRight"Click on the right button" code of the Edit control.
WEBDEV - Server code This constant is not available.
trtClickHTMLLink"Click on a link" code of an HTML Display control.
WEBDEV - Server code This constant is not available.
trtClickTokenClick code on a token in a "Text token" Edit control.
WEBDEV - Server code This constant is not available.
trtClosing
  • Window closing code.
  • Page closing code.
  • Report closing code.
trtCollapseExpandBranchCollapsed/Expanded code of a node in a TreeView or TreeView Table control.
trtCollapseExpandBreakCollapsed/Expanded code of a break in a Looper or Table control.
WEBDEV - Server code This constant is not available.
trtComboClosingCode executed when the drop-down list is closed.
WEBDEV - Server code This constant is not available.
trtComboOpeningCode executed the drop-down list of a Combo Box control is expanded.
WEBDEV - Server code This constant is not available.
trtDelayedPlaneLoad"Delayed plane load" code of a plane.
trtDeleteDiagShapeCode executed when a shape is deleted from a Diagram Editor control.
trtDeleteKanbanCardCode executed when a card is deleted from a Kanban control.
trtDeleteOrganizerAptCode executed when an appointment is deleted from an Organizer control.
trtDeleteScheduleAptCode executed when an appointment is deleted from a Scheduler control.
trtDeleteTokenCode executed when a token is deleted from a "Text token" Edit control.
WEBDEV - Server code This constant is not available.
trtDeleteWidgetCode executed when a widget is deleted from a Dashboard control.
trtDisplayContextMenuOptional code for displaying the popup menu.
WEBDEV - Server code This constant is not available.
trtDoubleClick
  • Double-click code.
  • Code of the button associated with the double click in the window.
trtEndChange"End of modification" code (Slider and Scrollbar control only).
WEBDEV - Server code This constant is not available.
trtEndInitialization"End of initialization" code (List Box, Table and Combo Box control based on a data file).
trtEndLoadingHTMLPage"After loading the HTML page" code of an HTML Display control.
WEBDEV - Server code This constant is not available.
trtEndMovingKanbanCardCode executed when the user stops moving a card in a Kanban control.
trtEnterEntry code of the control.
trtEnterInputOrganizerAptCode executed when the user enters an appointment in an Organizer control.
WEBDEV - Server code This constant is not available.
trtEnterInputSchedulerAptCode executed when the user enters an appointment in a Scheduler control.
WEBDEV - Server code This constant is not available.
trtEnterInputTokenCode executed when the user enters a token in a "Text token" Edit control.
trtEnterRolloverMouse enter optional code in a Table control.
trtExitExit code of the control.
trtExitRolloverMouse leave code in a Table control.
trtFilterCode executed when the report data is filtered.
trtGetFocusCode executed when the window gains focus.
trtHorizontalScroll"Horizontal scrollbar" code (Scrollbar control only).
trtInit
  • Control initialization code.
  • Window initialization code.
  • Page initialization code.
  • Report opening code.
trtKanbanCardDetailsCode executed when the details of a card are displayed in a Kanban control.
trtKeyDownKey Down code.
trtKeyPressedKey Pressed code.
trtKeyUpKey Up code.
trtKillFocusCode executed when the window loses focus.
trtLeftButtonDoubleClickCode of double click on left button.
trtLeftButtonDownCode of left button down.
trtLeftButtonUpCode of left button up.
trtLineDisplayCode executed when a row is displayed (Table control only).

trtLineEnterEntry code of a row (Table control only).
WEBDEV - Server code This constant is not available.
trtLineExitExit code of the row (Table control only).
WEBDEV - Server code This constant is not available.
trtLoadingHTMLResource"Load resources" code of an HTML Editor or HTML Display control.
WEBDEV - Server code This constant is not available.
trtMenuOptionCode of a menu option (main or context menu).
trtMiddleButtonDoubleClickCode of double click on middle button.
trtMiddleButtonDownCode of middle button down.
trtMiddleButtonUpCode of middle button up.
trtModificationColumnFilterCode "Whenever modifying the filter (user input in header)" of a Table Column control.
WEBDEV - Server code This constant is not available.
trtModificationSpreadsheetCell"Modify a cell" code of the Spreadsheet control.
WEBDEV - Server code This constant is not available.
trtMouseWheelCode for using the mouse wheel.
trtMoveDiagShapeCode executed when the user moves a shape in a Diagram Editor control.
trtMoveKanbanCardCode executed when the user moves a card in a Kanban control.
trtMoveOrganizerAptCode executed when the user moves an appointment in an Organizer control.
trtMoveScheduleAptCode executed when the user moves an appointment in a Scheduler control.
trtMoveWidget"Move a widget" code of the Dashboard control.
trtMoveWindowCode for moving the window.
WEBDEV - Server code This constant is not available.
trtOpening
  • Window initialization code.
  • Page opening code.
  • Report opening code.
trtOrganizerInputExitAptCode executed when the user leaves the input field of an appointment in an Organizer control.
trtPostPrint"Post Print" code of a block in a report.
trtPrePrint"Pre Print" code of a control in a report.
trtPullToRefresh"Pull to refresh" code in a Table or Looper control.
WEBDEV - Server code This constant is not available.
trtReadDataCode executed when the report data is read.
trtReadFirstCode executed when the first record is read (Table control only).
trtReadLastCode executed when the last record is read (Table control only).
trtReadNextCode executed when the next record is read (Table control only).
trtReadPreviousCode executed when the previous record is read (Table control only).
trtReassignResourceScheduleAptCode executed when an appointment is reassigned in a Scheduler control.
trtRequestRefresh"Request for refreshing the display" code (window and internal window).
WEBDEV - Server code This constant is not available.
trtResizeCode executed when the window is resized.
trtResizeDiagShapeCode executed when a shape is resized in a Diagram Editor control.
trtResizeOrganizerAptCode executed when an appointment is resized in an Organizer control.
trtResizeScheduleAptCode executed when an appointment is resized in a Scheduler control.
WEBDEV - Server code This constant is not available.
trtResizeWidget"Resize a widget" code of a Dashboard control.
trtRightButtonDoubleClickCode of double click on right button.
trtRightButtonDownCode of right button down.
trtRightButtonUpCode of right button up.
trtRightClick
  • Right-click code (for TreeView controls only).
  • Code of the button associated with the right click in the window.
WEBDEV - Server code This constant is not available.
trtRightClickHTMLLink"Right click on a link" code of an HTML Display control.
WEBDEV - Server code This constant is not available.
trtRolloverRollover code of control.
trtScheduleInputExitAptCode executed when the user leaves the input field of an appointment in a Scheduler control.
trtSelectDiagShapeCode executed when a shape is selected in a Diagram Editor control.
trtSelectionSelection code (Combo Box, List Box and Table control).
trtSelectOrganizerAptCode executed when an appointment is selected in an Organizer control.
WEBDEV - Server code This constant is not available.
trtSelectOrganizerPeriodCode executed when a time range is selected in an Organizer control.
WEBDEV - Server code This constant is not available.
trtSelectScheduleAptCode executed when an appointment is selected in a Scheduler control.
WEBDEV - Server code This constant is not available.
trtSelectSchedulePeriodCode executed when a time range is selected in a Scheduler control.
WEBDEV - Server code This constant is not available.
trtSliderChange"Whenever modified" code (Slider control only).
WEBDEV - Server code This constant is not available.
trtSpinMinusCode executed when the value decreases in a Spin control.
WEBDEV - Server code This constant is not available.
trtSpinPlusCode executed when the value increases in a Spin control.
WEBDEV - Server code This constant is not available.
trtStartLoadingHTMLPage"Before loading the HTML page" code of an HTML Display control.
WEBDEV - Server code This constant is not available.
trtStartMovingKanbanCardCode executed when the user starts moving a card in a Kanban control.
trtSystemButton"Before closing with OK/Close button" code.
trtSystemKeyDownSystem Key Down code.
trtSystemKeyPressedSystem Key Pressed code.
trtSystemKeyUpSystem Key Up code.
trtUpdateUI"Request for refreshing the display" code (window and internal window).
WEBDEV - Server code This constant is not available.
trtValueAssignmentCode executed when the Value property of the Web Component control is assigned.
trtValueRetrievalCode executed when the Value property of a Web Component control is retrieved.
trtVerticalScroll"Vertical scrollbar" code (Scrollbar control only).
trtWinEdChangeSizeCode run when resizing a control in "Edit by the user" mode. This process is mainly used to identify the operation performed by the user and to run a specific code.
WEBDEV - Server code This constant is not available.
trtWinEdMoveCode run when moving a control in "Edit by the user" mode. This process is mainly used to identify the operation performed by the user and to run a specific code.
WEBDEV - Server code This constant is not available.
trtWinEdSelectionCode run when selecting a control in "Edit by the user" mode. This process is mainly used to identify the operation performed by the user and to run a specific code.
WEBDEV - Server code This constant is not available.
trtZoomModificationCode executed when the zoom value changes in a Range Slider control.
WEBDEV - Server code This constant is not available.
<Procedure>: Name of the WLanguage procedure
Name of WLanguage procedure or method to run.
Caution: all you have to do is specify the name of the procedure (without brackets).
Remarks

Case of optional events

If the event modified by the Process property is an optional event of the control (window or page), this event is automatically created: there is no need to add this event in the code editor.

Case of events that expect parameters

Some events use parameters (e.g., events of Organizer or Scheduler controls). The procedure defined by the Process property must not expect more parameters than the associated event (however, it can expect less parameters).

Using the MySelf keyword

If the MySelf keyword is used in a procedure called by the Process property, it will correspond to the control that executes the procedure.

Exiting a sequence of procedures

If several procedures are executed in a sequence, this sequence can be interrupted from the code of one of the procedures using SetFocusAndReturnToUserInput.
Example:
// Click on BTN_Button1
BTN_Button1.Process[trtClick] += MyProc1
BTN_Button1.Process[trtClick] += MyProc2
// Click on BTN_Button1
Trace("Click on Button 1")
PROCEDURE MyProc1()
Trace(dbgInfo(dbgProcess))
SetFocusAndReturnToUserInput(MySelf.Name)
PROCEDURE MyProc2()
Trace(dbgInfo(dbgProcess))
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/12/2024

Send a report | Local help