PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Code of subscripted control
  • Handling a subscripted control directly (assignment, ...)
  • Edit control or column in a Table control
  • Column of Table control
  • Notes: Subscripted column and non-subscripted column
  • Operating mode of the FileToScreen and ScreenToFile functions
  • WLanguage properties and subscripted controls
  • WLangage functions specific to the management of subscripted controls
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Code of subscripted control
All the subscripted controls with the same name are associated with the same processes.
For example, the initialization code of the subscripted control named EDT_Edit1[1] is the same as the initialization code of the subscripted control named EDT_Edit1[5].
Handling a subscripted control directly (assignment, ...)

Edit control or column in a Table control

To handle a subscripted control by programming, the subscript must be specified.
For example: SubscriptedControl[1] to handle the first subscripted control.

Column of Table control

The columns of a Table control can be subscripted: the Table control includes several columns with the same name. Each column is identified by its name and by its subscript.
To retrieve the value of a subscripted column in a Table control, the syntax is as follows:
Value = <Column_Name>[<Row>, <Subscript>]
To assign a subscripted column in a Table control, the syntax is as follows:
<Column_Name>[<Row>, <Subscript>] = Value
with:
  • <Column_Name>: name of subscripted column
  • <Row>: row number
  • <Subscript>: subscript of column.
Example: A Table control contains a subscripted column (COL_Address). Two columns are associated with Address. To handle these columns, use the following syntax:
// Assigns the row 1 of COL_Address[2]
COL_Address[1,2] = "3 main street"
// Changes the background color of row 5 in COL_Address[1]
COL_Address[5,1]..BrushColor = LightGreen
// Changes the background color of row 4 in COL_Address[2]
COL_Address[4,2]..BrushColor = LightGreen

Notes: Subscripted column and non-subscripted column

  • For the subscripted columns:
    <ColumnName>[Subscript n] returns the content of the column whose subscript is n on the current row.
  • For the non-subscripted columns:
    <ColumnName>[Subscript n] returns the content of the column on row n.
  • <ColumnName>[<Row>][<Subscript>] is equivalent to <ColumnName>[<Row>,<Subscript>]
Operating mode of the FileToScreen and ScreenToFile functions
FileToScreen and ScreenToFile automatically manage the link between the subscripted controls and the array items. The subscripted control must be associated with one of the elements of the array item.
WLanguage properties and subscripted controls
The following syntax is used to access a property of a subscripted control:
<ControlName>[<Subscript>]..<Property>

<Column Name> [<Row>, <Subscript>]..<Property>
  • <ControlName> is the name of the control
  • <Subscript> is the subscript of the control (the subscript is set to 1 by default)
  • <Property> is one of the properties proposed by WINDEV.
For a subscripted control, <ControlName>..<Property> only assigns the control whose subscript is set to 1.
All the properties available for the edit controls and for the columns of Table controls can be used on the subscripted controls.
The properties apply to each control and not to all the controls of the subscripted control.
WLangage functions specific to the management of subscripted controls
The following functions are used to manage the subscripted controls:
CurrentColumnReturns the subscript of the current subscripted column in a browsing Table control or in a memory Table control.
ScreenFirstDefines the next control that will be in edit in the current window.
CurrentSubscriptReturns the subscript of the current control.
NextSubscriptReturns the number of the next row displayed in the current Table control.
Returns the subscript of the next subscripted control.
Minimum required version
  • Version 9
Comments
Click [Add] to post a comment