ISLabel.AutoSize

Description

This property is True if the size of the specified label control is calculated automatically.

Syntax

object.AutoSize

Part Attribute Type Description
object Required
The object always implements the ISLabel interface

Return Value

bool

Example

Display AutoSize for the specified label control.

Dim aLabel
Dim aLabelInfo

Set aLabel = Form.Controls_("Label1")

aLabelInfo =_  
  "ShortName: " & aLabel.ShortName & vbNewLine &_
  "TypeName: " & aLabel.TypeName & vbNewLine &_
  "AutoSize: " & aLabel.AutoSize & vbNewLine &_
  "Auto Size_: " & aLabel.AutoSize_               
  
Profile.MsgBox(aLabelInfo) 
Note: If the property 'WordWrap' is set to 'True', 'Autosize' adjusts the width of the control, then the height. If the property 'WordWrap' is set to 'False', 'Autosize' adjusts the hight of the control (up to the row height), then the width. This macro should be executed in any event handler of the form control.

In Profile Client v8 on User Interface Auto Size can be found in Maintain > Templates > Health Record Collection Templates > Open the selected form template > Open form editor > Object Inspector > Select the label control in the controls tree > Autosize.

Version information

Added in v7.8.0