ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Various properties
  • Value of Static control
  • Value of Calculated control in a report
  • Value of Image control
  • Value of Static control or preset control found in a report
  • Value of window or page
  • Value of edit control
  • Value of Button control
  • Value of Check Box control or value of option in a Check Box control
  • Value of Radio Button control
  • Value of List Box, ListView or Table control
  • Value of Combo Box control
  • Value of Chart control
  • Value of Rating control
  • Value of HTML control
  • Value of Map control
  • Limitations
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 Value property is used to:
  • Find out and modify the value of a report control.
  • Find out and modify the value of a control or the title of a window.
  • Find out the identifier of a stream.
  • Find out and modify the value of a control or the title of a page.
  • AndroidiPhone/iPadIOS Widget Center the map found in a Map control on a specific position.
  • Get the value associated with a value of a variable of type Enumeration.
  • AndroidiPhone/iPadIOS Widget Find out the identifier or the handle associated with a Native Container control.
Remark: The Value property is rarely used and can be replaced with an equivalent syntax (see Remarks).
Example
// Modify the image file associated with the "IMG_Image" control
IMG_Image.Value = "C:\MyImages\Image.BMP"
Syntax

Finding out the value of an element Hide the details

<Result> = <Element used>.Value
<Result>: Any type
This result depends on the element type.
<Element used>: Type of element
Name of the element to be used.

Modifying the value of an element Hide the details

<Element used>.Value = <New value>
<Element used>: Type of element
Name of element to use.
<New value>: Any type
New value for the specified element. This parameter depends on the type of specified element.
Remarks
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetApple Watch

Value of Static control

The Value property is used to retrieve or modify the text of a Static control.
<Result> is a character string.
To retrieve the text of a Static control, the following syntaxes are equivalent:
ResCaption = <Static control>.Value
ResCaption = <Static control>
ResCaption = <Static control>.Caption
Universal Windows 10 AppiPhone/iPadIOS Widget

Value of Calculated control in a report

The Value property is used to retrieve or modify the value of a Calculated control in a report.
The type of <Result> depends on the type of the Calculated control.
To retrieve the value of a Calculated control, use one of the following syntaxes:
ResValue = <Calculated control>.Value

ResValue = <Calculated control>
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetApple Watch

Value of Image control

The Value property is used to identify or modify the image file associated with an Image control.
<Result> is a character string containing the path of the image file.
To identify the image file associated with an Image control, use one of the following syntaxes:
ResImage = <Image control>.Value

ResImage = <Image control>
Universal Windows 10 AppiPhone/iPadIOS Widget

Value of Static control or preset control found in a report

The Value property is used to identify or modify the content of the control.
In an assignment, the type of the value passed to the Value property depends on the type of the item associated with the control.
If the item is numeric, you must assign a number to it and make sure you use the right input mask (InputMask property).
A date must be assigned to a Date control.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetApple Watch

Value of window or page

The Value property is used to retrieve or change the title of a window or page.
<Result> is a character string.
The Value and Title properties are equivalent.
To find out the title of a window or the title of a page, use one of the following syntaxes:
ResTitle = <Name of window or page>.Value

ResTitle = <Name of window or page>

ResTitle = <Name of window or page>.Title
Universal Windows 10 AppAndroidiPhone/iPadIOS WidgetApple Watch

Value of edit control

The Value property is used to retrieve or change the value entered in an Edit control.
<Result> has the following type:
  • character string if the subtype of the Edit control corresponds to "Text", "Date" or "Time",
  • integer or real if the subtype of the Edit control corresponds to "Numeric",
  • numeric if the subtype of the Edit control corresponds to "Currency" or "Currency + Euro".
To find out the value typed in an edit control, use one of the following syntaxes:
ResValue = <Edit control>.Value

ResValue = <Edit control>
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetApple Watch

Value of Button control

The Value property is used to retrieve and modify the text of a Button control.
If the Button control contains an image, only the text is returned. It is not possible to assign a drawing to a Button control.
<Result> is a character string.
The Value and Caption properties are equivalent.
To know the text of a Button control, use one of the following syntaxes:
ResButton = <Button control>.Value

ResButton = <Button control>

ResButton = <Button control>.Caption

Value of Check Box control or value of option in a Check Box control

The Value property is used to:
  • Check or uncheck an option in a Check Box control.
  • Find out whether an option found in a Check Box control is checked or unchecked
<Result> is a boolean:
  • True if the option is checked,
  • False otherwise.
To find out whether an option found in a Check Box control is checked or not, use one of the following syntaxes:
ResChecked = <Check Box control>[<Option number>].Value

ResChecked = <Check Box control>[<Option number>]

ResChecked = <Option name>.Value

ResChecked = <Option name>
Remark: If <Option number> is not specified, the first option is selected by default.
Universal Windows 10 AppAndroidiPhone/iPadIOS Widget

Value of Radio Button control

The Value property is used to:
  • Find out the active option in a Radio Button control.
  • Select an option.
<Result> is an integer.
To find out the active option in a Radio Button control, use one of the following syntaxes:
ResOption = <Radio Button control>.Value

ResOption = <Radio Button control>
Remark: A Radio Button control is always positioned on a position (1 by default). To display a Radio Button control with no default option, all you have to do is assign -1 to the control value during its initialization:
// Initialize the value of "RADIO_Customer" with its initial value
RADIO_Customer.InitialValue = -1
Universal Windows 10 AppAndroidiPhone/iPadIOS Widget

Value of List Box, ListView or Table control

Two distinct cases may occur.
  • The List Box, ListView or Table control is populated programmatically OR the StoredItem property corresponds to an empty string ("").
    The Value property is used to:
    • Get the selected row. If no row is selected, the Value property returns -1. If the control allows for multiple selection, the number of the last selected row is returned.
      To find out the selected row, use one of the following syntaxes:
      ResRow = <Control name>.Value

      ResRow = <Control name>
    • Select another row by specifying the number of the new row to select. The rows previously selected are deselected.
  • The List Box, ListView, or Table controls are based on a data file AND the StoredItem property is not empty.
    The Value property is used to identify the stored item for the record associated with the selected row. If no row is selected, the Value property returns an empty string ("").
    To find out the stored item associated with the selected row, use one of the following syntaxes:
    ResStoredItem = <Control name>.Value

    ResStoredItem = <Control name>.StoredItem
AndroidiPhone/iPadIOS Widget ListView controls are not available.
Android

Value of Combo Box control

Two distinct cases may occur.
  • The Combo Box control is editable AND the StoredItem property corresponds to an empty string ("").
    The Value property is used to:
    • Find out the value of the selected item. If no element is selected, the Value property returns an empty string ("").
      To find out the value of the selected element, use one of the following syntaxes:
      ResValue = <Combo Box control>.Value

      ResValue = <Combo Box control>
    • Modify the value of the selected element.
  • The Combo Box is not editable OR the StoredItem property is not empty.
    The Value property is used to determine the number of the selected element.
    To find out the number of the selected element, use one of the following syntaxes:
    ResElement = <Combo Box control>.Value
    ResElement = <Combo Box control>[<Combo Box control>]
    ResElement = <Combo Box control>
Universal Windows 10 AppiPhone/iPadIOS Widget

Value of Chart control

The Value property can only be used to get the name of a Chart control.
<Result> is a character string.
To find out the name of a Chart control, use one of the following syntaxes:
Res_ChartName = <Chart control>.Value

Res_ChartName = <Chart control>
AndroidiPhone/iPadIOS Widget

Value of Rating control

The Value property is used to initialize and determine the value of a Rating control.
This value corresponds to the number of icons displayed in the control.
Example:
RATE_Nation1.Value = 4.5
Universal Windows 10 App

Value of HTML control

The Value property is used to get the address associated with the HTML page displayed in the control. If the page:
  • is a page built in HTML directly, the value corresponds to "about:blank".
  • is a page from a site, the value corresponds to the address of the page (www.windev.com for example).
  • is an HTML file, the value corresponds to the address of the file.
Universal Windows 10 App The Value property returns the URL of the site but cannot return the HTML code of the control. This property cannot be used to associate a local htm file with the HTML control.
AndroidiPhone/iPadIOS Widget

Value of Map control

The Value property is used to center the map (in a Map control) on the position that corresponds to a geoPosition variable.
Example:
// Centers the map displayed by the "MAP_Position" control on a geographical position
MyPosition is géoPosition
 
MAP_Position.Value = MyPosition
Remarks:
  • The Value property is equivalent to the MapDisplayPosition function. The only difference is: when MapDisplayPosition is used, an animation is shown when setting the position to the desired location.

Limitations

Universal Windows 10 AppiPhone/iPadIOS Widget In a report, the Value property cannot be used on:
  • a report.
  • a report block.
  • a Check Box control.
  • a Shape control.
  • an Organizer control.
  • a Scheduler control.
  • a Gantt Chart control.
  • a Signature control.
Android Widget The Value property can only be used with the following elements:
  • Button control.
  • Static control.
  • Image control.
  • Window.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/17/2023

Send a report | Local help