| 4D View v15PV Get row height | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|  | 
    4D View v15
 PV Get row height 
         | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PV Get row height ( area ; row ) -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| area | Longint |   | 4D View area | |||||
| row | Longint |   | Row number | |||||
| Function result | Integer |   | Row height in pixels | |||||
The PV Get row height command returns the height (in pixels) of the specified row.
Refer to the example for the PV SET COLUMNS WIDTH command.
Since 4D version 2004.5, the Print form command can be used to print 4D View areas. Generally, these areas are printed with a fixed height. The following example shows how to use the print commands of 4D and the PV Get row height command in order to vary the printing height of the 4D View area depending on its contents.
 If(Form event=On Printing Detail)
    GET OBJECT RECT(4DViewarea;$left;$top;$right;$bottom)
    $posmarker:=Get print marker(Form detail)
    $areaheight:=$bottom-$top
    $newheight:=4DViewSizeCalcul
  ` 4DViewSizeCalcul returns the height of the 4D View area depending on its contents
  ` This method is shown below
    $offset:=$newheight-$areaheight
    MOVE OBJECT(4DViewarea;0;0;0;$offset)
    SET PRINT MARKER(Form detail;$posmarker+$offset)
 End if $area:=PV New offscreen area
 PV BLOB TO AREA($area;[Table 1]View_)
 PV EXECUTE COMMAND($area;pv cmd edit go to last cell)
 PV GET CURRENT CELL($area;$column;$row)
 $height:=0
 For($i;1;$row)
    $rowHeight:=PV Get row height($area;$i)
    $height:=$height+$rowHeight
 End for
 PV DELETE OFFSCREEN AREA($area)
 $0:=Trunc($height*0.75;0)
	Product:  4D View
	Theme:  PV Columns and Rows
	Number:  
        15951
        
        
        
	
	Modified:  4D View 2004.5
	
	
	
	
	
	
	
	
	4D View Language ( 4D View v15)
	
	
	
	
	
	
	
 Add a comment
Add a comment