4D View v16

PV SET COLUMNS WIDTH

Home

 
4D View v16
PV SET COLUMNS WIDTH

PV SET COLUMNS WIDTH 


 

PV SET COLUMNS WIDTH ( area ; first ; last ; width ) 
Parameter Type   Description
area  Longint in 4D View area
first  Longint in First column number
last  Longint in Last column number
width  Integer in Column width in pixels

The PV SET COLUMNS WIDTH command allows modifying the width (in pixels) of area columns located between the first and last included columns.

Note : If you pass 0 (zero) in the first and last parameters, the defined width will be applied to all the columns of the area and will become the new default column width for the area. The default width is applied notably when the user double-clicks on the right-hand separator of a column.

Example  

This example illustrates a resizing of rows and columns:

 C_LONGINT($Column;$Row`Principle loop index
 C_LONGINT($Width;$Height`Index of the column and row enlargement loop
 C_LONGINT($StartWidth`Original width of the Xth column
 C_LONGINT($RequestWidth`Requested width of the Xth column
 
  `Let's initialize
 $StartWidth:=5 `Set the original width
 $RequestWidth:=$StartWidth+5 `10 point width for the first column
 
 For($Column;1;5) `Taken care of for the first 5 columns
    $Row:=$Column  `Only for the first five lines
    For($Width;$StartWidth;$RequestWidth;2) `For the column "$Column"...
       $Height:=$Width-5 `Update height
       PV SET ROWS HEIGHT(area;$Row;$Row;PV Get row height(area;$Row)+$Height`1 row
       PV SET COLUMNS WIDTH(area;$Column;$Column;PV Get column width(area;$Row)+$Width`1 column
       PV REDRAW(area) `Refresh
    End for
    $StartWidth:=$RequestWidth  `To not start at the beginning
    $RequestWidth:=$RequestWidth+5 `Increase for the next column
 End for



See also 

PV Get column width
PV SET ROWS HEIGHT

 
PROPERTIES 

Product: 4D View
Theme: PV Columns and Rows
Number: 15954

 
HISTORY 

Created: 4D View 6.8

 
ARTICLE USAGE

4D View Language ( 4D View v16)