ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Control functions
  • Declaring a Control variable
  • Assigning a Control variable
  • Using a Control variable in a procedure
  • Optimizing the processes with indirection
  • Properties associated with a Control variable
  • Functions that use a Control variable
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The Control type is used to define the characteristics of a control. This control can be dynamically created by ControlCreate or a control in a window or report.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
Remarks

Declaring a Control variable

The following syntax is used to declare a Control variable:
<Variable name> is Control
Example:
c is Control
In the declaration of a variable of type Control, you can specify the type of control using the following syntax:
<Variable name> is Control <control type = <Control type>>
where <Control type> is the constant that corresponds to the type of control to be created (see below).
Example:
MyControl is Control <control type = typButton>
The following constants can be used to define the control type:
typActiveX17ActiveX control
WEBDEV - Server code
Not available.
typOrganizer76Organizer control
typScrollbar18Scrollbar control
WEBDEV - Server code
Not available.
typAttribute41Attribute of a Looper control
typSlidingBanner122 Sliding Banner control
typNavigationBar117Navigation Bar control
typToolbar22Toolbar control
WEBDEV - Server code
Not available.
typToolbox29Sidebar control
WEBDEV - Server code
Not available.
typButton4Button control
New in version 2025
typSegmentedButton
148Segmented Button control
WEBDEV - Server code
Not available.
typCalendar47Calendar control
typCaptcha82Captcha control
typMap92Map control
typCarousel37Carousel control
WEBDEV - Server code
Not available.
typStatusBarBox40002Cells of a status bar
WEBDEV - Server code
Not available.
typCell50014Cell control
typCellCSSGrid147Cell control in a CSS Grid control.
typNavigationBarCell115Cell control in a Navigation Bar control.
typCellLayout127Cell in a Layout control
Linux Not available.
typCelluleFlexBox139Cell of a FlexBox control.
typCellPageLayout84Cell control used for the Zoning layout.
typFormattedControl50001Formatted display control
typHTMLControl50002HTML control
typMenuControl50007Menu of a WEBDEV page
typContextMenuControl141Context menu in a WEBDEV page
typBreadcrumb50011Breadcrumb control
typClick30001Clickable Image control (Image control with the "This image is a clickable area" option).
WEBDEV - Server code
Not available.
typBarCode26Bar Code control
WEBDEV - Server code
Not available.
typColumn56Table column
typComboWE10001Editable Combo Box control
typComboNE10002Non-editable Combo Box control
typWebComponent121Web Component control
typConference25Conference control
WEBDEV - Server code
Not available.
typNativeContainer125Native Container control
WEBDEV - Server code
Not available.
typCube38Cube control
WEBDEV - Server code
Not available.
typDate20002Date Edit control
typLayout126Layout control
Linux Not available.
typDuration20006Duration Edit control
typDiagramEditor130Diagram Editor control
Linux
Not available.
typCodeEditor146Code Editor control
WEBDEV - Server codeLinux
Not available.
typHtmlEditor134HTML Editor control
WEBDEV - Server codeLinux
Not available.
typImageEditor124Image Editor control
WEBDEV - Server codeLinux
Not available.
typMobileImageEditor138Mobile Image Editor control
WEBDEV - Server codeWindowsLinux
Not available.
typWin1Window
WEBDEV - Server code Not available.
typInternalWindow31Internal Window
WEBDEV - Server code Not available.
typWire118Wire control
WEBDEV - Server codeLinux
Not available.
typFlash50008Flash control
typFlex48Flex control
typFlexbox139Flexbox control
WEBDEV - Server code
Not available.
typShape20Shape/Drawing control
typGantt110Gantt Chart column (Table or TreeView Table control).
WEBDEV - Server code
Not available.
typChart33Chart control in a window or page
typGrp58Group of controls
typTime20003Time Edit control
typHTML23HTML static
typIFrame50013IFrame control
typImage8Image control
typCheckBox5Check Box control
typSwitch132Switch control
typProgressBar10Progress Bar control
typInfiniteProgressBar113Infinite Progress Bar control
WEBDEV - Server code Not available.
typJava50004Java control
typKanban140Kanban control
typPDFReaderPDF Reader control
WEBDEV - Server codeLinux
Not available.
typStatic3Static Text control
typHTMLStatic50006HTML Static control
typLink50005Link control
typSocialLink103Social Network control
typHorizontalRule50003Line control
typList7List Box control
typListView27ListView control
WEBDEV - Server code
Not available.
typKanbanList142Kanban List control
typMapArea50010Clickable Image control
typControlTemplate43Control Template control.
typCurrency20005Currency Edit control
typMultimedia39Multimedia control
WEBDEV - Server code Not available.
typRating85Rating control
Linux
Not available.
typRepositionableNote119Repositionable Note control
WEBDEV - Server code
Not available.
typNum20004Numeric Edit control
typOle15OLE control
WEBDEV - Server code
Not available.
typTab16Tab control
typSwitchOption133Option of a Switch control
typMenuOption40001Menu option
typOrganizationChart86Organization Chart control
WEBDEV - Server code
Not available.
typPage1Page
typPeelingCorner79Peeling Corner control
typInternalPage31Internal page
typPanel131Dockable Panel control
WEBDEV - Server code
Not available.
typSlidingBannerPlane123Plane associated with a Sliding Banner control
typSiteMap45Site Map control
typScheduler80Scheduler
typPopup90Popup page
typSlider12Slider control
typRangeSlider72Range Slider
typRotativeSlider13Round Slider
WEBDEV - Server code
Not available.
typRangeSlider72Range Slider control
WEBDEV - Server code
Not available.
typPager50009Pager control
typRibbonGroupRibbon group
WEBDEV - Server code
Not available.
typRibbon87Ribbon control
WEBDEV - Server code
Not available.
typBreakBreak in a Looper control
typRadioButton6Radio Button control
typSplitter28Splitter control
WEBDEV - Server code
Not available.
typSilverlight46SilverLight control
typSpin11Spin control
WEBDEV - Server code
Not available.
typSuperControl40Supercontrol
typTable9Table control
typPivotTable102Pivot Table control
WEBDEV - Server code
Not available.
typDashboard111Dashboard control
typTreeviewTable35TreeView Table control
typSpreadsheet114Spreadsheet control
WEBDEV - Server code
Not available.
typText20001Text Edit control
typDrawer34Drawer control
typWordProcessing120Word Processing control
WEBDEV - Server code
Not available.
typTreeMap74TreeMap control
WEBDEV - Server code
Not available.
typTreeView19TreeView control
typUpload73Upload control
typVideo78Video control
typThumbnail50012Thumbnail control
typWebCam24Web Camera control
typXaml36Xaml control
WEBDEV - Server code
Not available.
typMultilineZone97Multiline Zone control
WEBDEV - Server codeWindowsLinux
Not available.
typLooper30Looper control
typLinearLooper77Linear Looper control
typRichTextArea109Text Area control
Note: To no longer associate a control with a variable of type Control, simply use VariableReset.

Assigning a Control variable

A Control variable can be used to handle:
  • a control in a window or in a report.
The assignment of a Control variable must be performed by the '<-' operator.
Examples:
// Assignment with an existing control
c is Control
c <- EDT_Edit1
// Assignment by using the indirection
// The variable references the EDT_EDIT2 control
c <- {"EDT_EDIT2"}
Caution: The '=' operator must not be used to assign a value to a variable of type Control. This operator is used to transfer the value of a control into another control of the same type. For example:
// Assignment with an existing control
c is Control
c <- EDT_Edit1

// Modify the value 
c = EDT_Edit3 // Equivalent code: EDT_Edit1.Value = EDT_Edit3.Value
c = "Text" // Equivalent code: EDT_Edit1.Value = "Text"
Note: To determine if a value has been assigned to a variable of type Control, use the Type property on the variable. Example:
PROCEDURE ValueAssignedToControlVariable(varControl is Control): boolean
// Check whether a control has been assigned to a variable of type Control 
sType is int
WHEN EXCEPTION IN
	sType = varControl..Type
DO
	RETURN False
END
RETURN True

Using a Control variable in a procedure

The Control type can be a parameter of a procedure.
Method 1: Syntax without the type of the control:
  • procedure code:
    PROCEDURE MyProcedure(C is Control)
    C = "It is " + TimeSys()
  • procedure call:
    MyProcedure(EDT_Edit1)
In this case, the type of the control is not checked at compile time.
Method 2: Syntax with the type of the control:
  • procedure code:
    PROCEDURE MyProcedure(C is Control <control type = typInputText>)
    C = "It is " + TimeSys()
  • procedure call:
    MyProcedure(EDT_Edit1)
Advantage: If the procedure call uses a control of an unexpected type, a compilation error is displayed: "The type of control passed as parameter is not compatible with the expected type."

Optimizing the processes with indirection

The Control type can be used to optimize the processes that use the indirections. You can write for example:
C is Control <-{s, indControl}
C.Width = 10
C.Height = 20
rather than the following code:
{s, indControl}..Width = 10
{s, indControl}..Height = 20

Properties associated with a Control variable

The Control type is used to manipulate all types of controls found in a window or in a report. The available properties depend on the type of control used.
For example, if a variable of type Control is used to manipulate an Edit control, all the Edit control WLanguage properties will be available for that variable. By specifying the type of control when declaring the Control variable, only the properties of that type will be suggested in the code editor.
To learn more about the properties of a control, go to the corresponding page and click "See also". For more details, see Window controls.

Functions that use a Control variable

All the WLanguage functions that manipulate the controls can be used on a Control variable. However, only the WLanguage functions corresponding to the type of control used will be available. By specifying the type of control when declaring the Control variable, only the functions of that type will be suggested in the code editor.
For example, if a variable of type Control is used to manipulate a Table control, all the TableXXX functions will be available for that variable.
New in SaaS
Note: ControlExist can be used on a variable of type Control to check for a given control.
Note: This feature is only available from WINDEV Suite SaaS 2025 - Update 3.
For more details, see Using new features exclusive to WINDEV Suite SaaS 2025.
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/23/2025

Send a report | Local help