Search
Table.ResizeToFitText Method
See Also
 



Resizes the columns and rows of a table so that the cells fit all their text.

 Syntax

VB6  Copy Code

Public Sub ResizeToFitText( _
    ByVal IgnoreCaption As Boolean _
)

C++  Copy Code

public:
void ResizeToFitText (
    bool IgnoreCaption
)

 Parameters

IgnoreCaption
Specifies whether the caption bar should be resized too.

 Remarks

This method resizes the cells so they fit their text on a single line, as long as the text does not contain new-line characters. The width of each column is set to the width of its widest cell, and the height of each row is set to the height of its highest cell. In the end, the table size is set to the sum of the extents of all rows and columns.

If IgnoreCaption is false, the caption bar will be resized too, by setting CaptionHeight and the table width, so that it fits the Caption text.

 See Also