PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Width of a window: Specific features
  • Initial width (control and window)
  • Column width
  • Width of controls in a form
  • Limits
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
..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 stackable 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.
WEBDEV - Server code The modification is available for the "Automatic" or "Dynamic" controls only ("Details" tab of control description).
WEBDEV - Server code The modification is available for the "Automatic" or "Dynamic" controls only ("GUI" tab of control description).
Notes:
  • 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 during the control description.
Versions 16 and later
Universal Windows 10 App This property is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This property is now available for the Windows Phone applications.
Universal Windows 10 App This property is now available for the Windows Phone applications.
Versions 15 and later
Android This property is now available for the Android applications.
New in version 15
Android This property is now available for the Android applications.
Android This property is now available for the Android applications.
Versions 17 and later
iPhone/iPad This property is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This property is now available for the iPhone/iPad applications.
iPhone/iPad This property is now available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This property is now available in Windows Store Apps mode.
iPhone/iPad This property is now available for the report controls and blocks in the iPhone/iPad applications.
New in version 18
Universal Windows 10 App This property is now available in Windows Store Apps mode.
iPhone/iPad This property is now available for the report controls and blocks in the iPhone/iPad applications.
Universal Windows 10 App This property is now available in Windows Store Apps mode.
iPhone/iPad This property is now available for the report controls and blocks in the iPhone/iPad applications.
Versions 20 and later
Android This property is now available for the Table controls and for the table columns in the Android applications.
iPhone/iPad This property is now available for the table columns in the iPhone/iPad applications.
New in version 20
Android This property is now available for the Table controls and for the table columns in the Android applications.
iPhone/iPad This property is now available for the table columns in the iPhone/iPad applications.
Android This property is now available for the Table controls and for the table columns in the Android applications.
iPhone/iPad This property is now available for the table columns in the 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 with 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 Name>..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 Name>: Character string (with or without quotes)
Name of the element (control, window, block, ...) to use.

Modifying the width of an element Hide the details

<Element Name>..Width = <New Width>
<Element Name>: Character string (with or without quotes)
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
WINDEVAndroidiPhone/iPadApple WatchWindows MobileUniversal Windows 10 AppJavaUser code (UMC)

Width of a window: Specific features

  • WINDEV The width of a window takes into account the shadow effect defined in the Windows theme.
  • iPhone/iPad The width of a window can differ according to the processes where ..Width is used. Indeed, the window is resized by the system between the declaration and initialization processes, causing a possible difference of value:
    • in the declaration process, the window is not visible yet therefore no size was given to it according to the device. The property returns the initial width (edit width) of the window.
    • in the initialization process, the window is visible on the screen and anchors and size modifications are applied to it. Therefore, the window width can be different.
    • The actual width of a window is known in the initialization process of the window.
WINDEVAndroidiPhone/iPadApple WatchWindows MobileUniversal Windows 10 AppJavaUser code (UMC)

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 disappears when the width is modified by programming (by ..Width or WinSize).
WINDEVReports and QueriesAndroidiPhone/iPadWindows MobileJavaUser code (UMC)

Column width

When modifying the width of a column in a Table control, the minimum width must also be modified (..MinWidth) if the specified width is less than the minimum width of the column (otherwise, the modification will be ignored).
Horizontal Table control: ..Width modifies the height of the row. ..Height is used to find out the width of the entire table. This property is available in read-only.
Versions 20 and later
AndroidiPhone/iPad The Table controls are now available in the iOS and Android applications.
New in version 20
AndroidiPhone/iPad The Table controls are now available in the iOS and Android applications.
AndroidiPhone/iPad The Table controls are now available in the iOS and Android applications.
WEBDEV - Server codeWEBDEV - Browser code

Width of controls in a form

In server code, the returned and modifiable width corresponds to the total height of the control (width of caption plus width of input area).
In browser code, the returned and modifiable width corresponds to the width of the input area.

Limits

WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadWindows MobileUniversal Windows 10 App ..Width cannot be used on a report.
WINDEVWEBDEV - Server code Limits for the controls:
  • In Windows 98, the size of elements is limited to ± 32 767.
  • In Windows NT/2000, it is possible (but not recommended) to specify a size up to ± 2 147 483 647.
WEBDEV - Server code ..Width is available in modification for the following controls:
  • Button.
  • Image.
  • Clickable image.
  • Java applet.
  • Chart.
  • Table column.
PHP ..Width is not available for the iFrame controls.
Java ..Width only applies to the following elements:
  • Button.
  • Static control.
  • Edit control.
  • Image.
  • Check box.
  • Radio button.
  • List box.
  • Combo box.
  • TreeView.
  • Tab.
  • Window.
  • Table.
  • Table column.
  • Supercontrol.
iPhone/iPad ..Width is not available for the Table controls. However, it is available for the table columns.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment