ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Various properties
  • 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
The Width property gets and changes 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. The WidthInPixel property is used to get the width in pixels of a control in a report.
  • The width of a control is defined in the editor in the control description.
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
WINDEVUniversal 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.
WINDEVUniversal Windows 10 AppJavaUser code (UMC)

Initial width (control and window)

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

Column width

When the width of a column is changed in a Table control, if the specified width is less than the minimum width, the latter must be modified (using the MinWidth property) to reflect the change.
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 read-only.

Limits

WINDEVUniversal Windows 10 App The Width property cannot be used on a report.
Java The Width property can only be used with the following elements:
  • Button.
  • Static.
  • Edit control.
  • Image.
  • Check Box.
  • Radio Button.
  • List Box.
  • Combo Box.
  • TreeView.
  • Tab.
  • Window.
  • Table.
  • Table column.
  • Supercontrol.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/08/2023

Send a report | Local help