Set Row Height - GRID SENDMSG() Function 68

Syntax

ROWHEIGHT$=SENDMSG(sysgui,id,68,rowheight,$${,context{,ERR=lineref}})

Description

This function adjusts the height of main (not heading) grid rows.

Parameter

Description

sysgui

SYSGUI channel.

id

Grid control ID.

68

Number of this SENDMSG() function.

rowheight

Row height, in pixels.

$$

Always null.

The default row height is based on the grid font, so normally there is no reason to adjust this setting unless to reduce the white space around text in cells or enlarge cells so the grid body will fill the area defined for it. Another way to make cells higher than the default is to adjust the interspace setting with SENDMSG() Function 60.

The grid control will not display a truncated row, so using this function may reduce or enlarge the space occupied by the grid. The return value is a binary representation of the new row height. Use DEC(ROWHEIGHT$) to get the numeric representation.

Example

The following example creates a grid 120 pixels high with three rows and expands the rows to 50 pixels high. Because three rows will not fit in the available space, two rows are displayed and the grid uses less than the full 120 pixels.

sysgui=unt;open (sysgui)"X0"
print (sysgui)'window'(50,50,200,150,"Grid Sample",$$,$$)
print (sysgui)'grid'(100,20,20,160,120,$9040$,3,3,3)
result$=sendmsg(sysgui,100,68,50,$$); rem row height
for col=0 to 2
result$=sendmsg(sysgui,100,36,col,chr(51)); rem column width
next col
escape

See Also

Set Interspace - SENDMSG() Function 60

BBjGrid::setRowHeight