ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Table functions
  • Use conditions
  • Creating/Deleting columns
  • Invisible columns
  • Equivalence between TableAdjust with the control properties
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Adjusts the title and size of columns found in a Table or TreeView Table control. You can define:
  • the column title,
  • the column width,
  • the alignment of column elements,
  • the input size of column.
Example
// Modification des titres et de la largeur des deux
// premières colonnes du champ "TABLE_TableProduit"
TableAdjust(TABLE_TableProduit, "Réf" + TAB + "50" + TAB + ...
	"C" + TAB + "12" + CR + "Désignation" + TAB + "200" + ...
	TAB + "G" + TAB + "12")
Syntax
TableAdjust(<Table control> [, <Format>])
<Table control>: Control name
Name of the control to be used. This field may correspond to:
  • a Table control,
  • a TreeView Table control.
If this parameter corresponds to an empty string (""), the control used will be the control to which the current event belongs.
<Format>: Optional character string
This parameter has the following format:
<Titre de la colonne 1> + TAB + <Taille de la colonne 1> + TAB + ...
<Cadrage des éléments> + TAB + <Taille de saisie> + RC + ...
...
<Titre de la colonne N> + TAB + <Taille de la colonne N> + TAB + ...
<Cadrage des éléments> + TAB + <Taille de saisie>
where:
<Title of column>Character stringModifies the title of column.
<Size of column>IntegerModifies the size of column (in characters).
<Alignment of elements>CharacterModifies the alignment of column elements:
  • "C": Centers the items in the column
  • "G": Frame elements on the left
  • "D": Frame the elements on the right
<Input size>IntegerModifies the number of characters that can be typed in the column (in number of characters and not in pixels).
Note: The width of a character corresponds to the width of the 'E' character in the field title font.

If this parameter is not specified, the width of columns is adjusted to the smallest possible width in order for the data to be visible.
Java This parameter must be specified.
Remarks

Use conditions

TableAdjust can be used on:
  • Table or TreeView Table controls based on a data file.
  • Table or TreeView Table controls populated programmatically.
  • single-selection or multi-selection controls.

Creating/Deleting columns

TableAdjust creates no column and deletes no column. The control columns must have been described in the window editor beforehand. Make sure that a sufficient number of columns exists before they are handled by TableAdjust.
If the number of columns found in the control is greater than the number of columns handled by TableAdjust, the last columns will have no title and a null size.

Invisible columns

If the columns managed by TableAdjust are invisible, these columns will automatically become visible.

Equivalence between TableAdjust with the control properties

The Title, Width, Size and HorizontalAlignment properties have the same effect as the TableAdjust function.
Component: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/21/2024

Send a report | Local help