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.
Java ControlCreate is not available.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
WINDEV
// Dynamically create a control in a window
c is Control
c <- ControlCreate("BUTTON_1", typButton, 30, 40, 140, 20) // Caution, not '='
c.Caption = "Click here"
c.Process[trtClick] = myProcedure
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
Java
Not available.
typOrganizer76Organizer control
Java
Not available.
typScrollbar18Scrollbar control
Java
Not available.
typAttribute41Attribute of a Looper control
WINDEVJava
Not available.
typSlidingBanner122 Sliding Banner control
WINDEVJava
Not available.
typNavigationBar117Navigation Bar control
WINDEVJava
Not available.
typToolbar22Toolbar control
Java
Not available.
typToolbox29Sidebar control
Java
Not available.
typButton4Button control
New in version 2025
typSegmentedButton
148Segmented Button control
typCalendar47Calendar control
typCaptcha82Captcha control
WINDEVJava
Not available.
typMap92Map control
Java
Not available.
typCarousel37Carousel control
Java
Not available.
typStatusBarBox40002Cells of a status bar
Java
Not available.
typCell50014Cell control
WINDEVJava
Not available.
typCellCSSGrid147Cell control in a CSS Grid control.
WINDEVJava
Not available.
typNavigationBarCell115Cell control in a Navigation Bar control.
WINDEVJava
Not available.
typCellLayout127Cell in a Layout control
Linux Not available.
typCelluleFlexBox139Cell of a FlexBox control.
WINDEVJava
Not available.
typCellPageLayout84Cell control used for the Zoning layout.
WINDEVJava
Not available.
typFormattedControl50001Formatted display control
WINDEVJava
Not available.
typHTMLControl50002HTML control
WINDEVJava
Not available.
typMenuControl50007Menu of a WEBDEV page
WINDEVJava
Not available.
typContextMenuControl141Context menu in a WEBDEV page
WINDEVJava
Not available.
typBreadcrumb50011Breadcrumb control
WINDEVJava
Not available.
typClick30001Clickable Image control (Image control with the "This image is a clickable area" option).
Java
Not available.
typBarCode26Bar Code control
Java
Not available.
typColumn56Table column
WINDEVJava Not available.
typComboWE10001Editable Combo Box control
typComboNE10002Non-editable Combo Box control
typWebComponent121Web Component control
WINDEVJava
Not available.
typConference25Conference control
Java
Not available.
typNativeContainer125Native Container control
Java
Not available.
typCube38Cube control
Java
Not available.
typDate20002Date Edit control
typLayout126Layout control
Linux Not available.
typDuration20006Duration Edit control
typDiagramEditor130Diagram Editor control
LinuxJava
Not available.
typCodeEditor146Code Editor control
LinuxJava
Not available.
typHtmlEditor134HTML Editor control
LinuxJava
Not available.
typImageEditor124Image Editor control
LinuxJava
Not available.
typMobileImageEditor138Mobile Image Editor control
WINDEVWindowsLinuxJava
Not available.
typWin1Window
typInternalWindow31Internal Window
typWire118Wire control
LinuxJava
Not available.
typFlash50008Flash control
WINDEVJava
Not available.
typFlex48Flex control
WINDEVJava
Not available.
typFlexbox139Flexbox control
Java
Not available.
typShape20Shape/Drawing control
typGantt110Gantt Chart column (Table or TreeView Table control).
Java
Not available.
typChart33Chart control in a window or page
Java
Not available.
typGrp58Group of controls
Java
Not available.
typTime20003Time Edit control
typHTML23HTML static
typIFrame50013IFrame control
WINDEVJava
Not available.
typImage8Image control
typCheckBox5Check Box control
typSwitch132Switch control
Java Not available.
typProgressBar10Progress Bar control
typInfiniteProgressBar113Infinite Progress Bar control
Java Not available.
typJava50004Java control
WINDEVJava
Not available.
typKanban140Kanban control
Java
Not available.
typPDFReaderPDF Reader control
LinuxJava
Not available.
typStatic3Static Text control
typHTMLStatic50006HTML Static control
WINDEVJava
Not available.
typLink50005Link control
WINDEVJava
Not available.
typSocialLink103Social Network control
WINDEVJava
Not available.
typHorizontalRule50003Line control
WINDEVJava
Not available.
typList7List Box control
typListView27ListView control
typKanbanList142Kanban List control
Java
Not available.
typMapArea50010Clickable Image control
WINDEVJava
Not available.
typControlTemplate43Control Template control.
typCurrency20005Currency Edit control
typMultimedia39Multimedia control
Java Not available.
typRating85Rating control
LinuxJava
Not available.
typRepositionableNote119Repositionable Note control
Java
Not available.
typNum20004Numeric Edit control
typOle15OLE control
Java
Not available.
typTab16Tab control
typSwitchOption133Option of a Switch control
Java Not available.
typMenuOption40001Menu option
Java Not available.
typOrganizationChart86Organization Chart control
Java
Not available.
typPage1Page
WINDEVJava
Not available.
typPeelingCorner79Peeling Corner control
WINDEVJava
Not available.
typInternalPage31Internal page
WINDEVJava
Not available.
typPanel131Dockable Panel control
Java
Not available.
typSlidingBannerPlane123Plane associated with a Sliding Banner control
WINDEVJava
Not available.
typSiteMap45Site Map control
WINDEVJava
Not available.
typScheduler80Scheduler
Java
Not available.
typPopup90Popup page
WINDEVJava
Not available.
typSlider12Slider control
Java
Not available.
typRangeSlider72Range Slider
WINDEVJava
Not available.
typRotativeSlider13Round Slider
Java
Not available.
typRangeSlider72Range Slider control
Java
Not available.
typPager50009Pager control
WINDEV
Not available.
typRibbonGroupRibbon group
Java
Not available.
typRibbon87Ribbon control
Java
Not available.
typBreakBreak in a Looper control
WINDEVJava
Not available.
typRadioButton6Radio Button control
typSplitter28Splitter control
Java
Not available.
typSilverlight46SilverLight control
WINDEVJava
Not available.
typSpin11Spin control
typSuperControl40Supercontrol
typTable9Table control
typPivotTable102Pivot Table control
Java
Not available.
typDashboard111Dashboard control
typTreeviewTable35TreeView Table control
typSpreadsheet114Spreadsheet control
Java
Not available.
typText20001Text Edit control
typDrawer34Drawer control
Java
Not available.
typWordProcessing120Word Processing control
Java
Not available.
typTreeMap74TreeMap control
Java
Not available.
typTreeView19TreeView control
typUpload73Upload control
WINDEVJava
Not available.
typVideo78Video control
WINDEVJava
Not available.
typThumbnail50012Thumbnail control
WINDEVJava
Not available.
typWebCam24Web Camera control
typXaml36Xaml control
Java
Not available.
typMultilineZone97Multiline Zone control
WINDEVWindowsLinuxJava
Not available.
typLooper30Looper control
typLinearLooper77Linear Looper control
WINDEVJava Not available.
typRichTextArea109Text Area control
WINDEVJava Not available.
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.
  • WINDEV a control created by ControlCreate.
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"}
WINDEV
// Assignment with a control created by ControlCreate
c is Control
c <- ControlCreate("BUTTON_1", typButton, 30, 40, 140, 20)
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