PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Width of a window: Specific features
  • Initial width (control and window)
  • Column width
  • Limits
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
Width is used to find out and modify the width:
  • of a control or block in a report.
  • of a control (found in a window), window, column found in a table or column found in a list box (including listview).
  • of a control (found in a page), column found in a table or column found in a list box. The control can be overlayable or not.
This property also allows you to find out the width of a table cell. To modify its width, modify the width of the corresponding column.
Remarks:
  • In a report, the border of the control or block is included in its width. WidthInPixel is used to find out the width of a report control in pixels.
  • The width of a control is defined in the editor in the control description.
Versions 15 and later
Android This property is now available for Android applications.
New in version 15
Android This property is now available for Android applications.
Android This property is now available for Android applications.
Versions 17 and later
iPhone/iPad This property is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This property is now available for iPhone/iPad applications.
iPhone/iPad This property is now available for iPhone/iPad applications.
Versions 18 and later
iPhone/iPad This property is now available for report controls and blocks in iPhone/iPad applications.
New in version 18
iPhone/iPad This property is now available for report controls and blocks in iPhone/iPad applications.
iPhone/iPad This property is now available for report controls and blocks in iPhone/iPad applications.
Versions 20 and later
Android This property is now available for Table controls and table columns in Android applications.
iPhone/iPad This property is now available for table columns in iPhone/iPad applications.
New in version 20
Android This property is now available for Table controls and table columns in Android applications.
iPhone/iPad This property is now available for table columns in iPhone/iPad applications.
Android This property is now available for Table controls and table columns in Android applications.
iPhone/iPad This property is now available for table columns in iPhone/iPad applications.
Versions 21 and later
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Example
// Increases the width of "EDT_CustomerName"
EDT_CustomerName.Width = EDT_CustomerName.Width + 15
// Is equivalent to: EDT_CustomerName.Width += 15
// Modify the width of two controls
EDT_CustomerLastName.Width += 100 // Adds 100 pixels
EDT_CustomerFirstName.Width += 10 // Adds 10 pixels
Syntax

Finding out the width of an element Hide the details

<Result> = <Element used>.Width
<Result>: Real
Width of the specified element. This width is expressed in pixels in a window and/or in a page, and in millimeters in a report.
<Element used>: Type of element
Name of the element (control, window, block, ...) to use.

Modifying the width of an element Hide the details

<Element used>.Width = <New width>
<Element used>: Type of element
Name of the element (control, window, block, ...) to use.
<New width>: Real
New width for the specified element. This width is expressed in pixels in a window and/or in a page, and in millimeters in a report.
Remarks
Universal Windows 10 AppAndroidiPhone/iPadIOS WidgetApple Watch

Width of a window: Specific features

  • iPhone/iPadIOS Widget The width of a window can be different depending on the events in which the Width property is used. The window is resized by the system between the declaration and initialization events, causing a possible difference of value:
    • in the "Global declarations" event, the window is not yet visible. Therefore, its size has not been set according to the device. The property returns the initial width (edit width) of the window.
    • in the "Initializing" event, the window is displayed on the screen, and anchors are applied, as well as size changes. Therefore, the window width can be different.
    • The actual width of a window is only known in the initialization event of the window..
Universal Windows 10 AppAndroidiPhone/iPadIOS WidgetApple Watch

Initial width (control and window)

The initial width (defined in the editor) is returned by InitialWidth.
In most cases, the width of an element depends on MaxWidth and MinWidth. However, this constraint no longer applies when the width is changed through programming (with the Width property or the WinSize function).
AndroidiPhone/iPadIOS Widget

Column width

When the width of a column is modified in a Table control, if the specified width is less than the minimum width, the latter must be modified (MinWidth) in order to apply the modification.
Horizontal Table control: The Width property changes the height of the row. The Height property is used to get the width of the entire table. This property is available in read-only mode.

Limits

Universal Windows 10 AppiPhone/iPadIOS Widget The Width property cannot be used on a report.
iPhone/iPadIOS Widget The Width property is not available on Table controls. However, it is available for table columns.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment