GefButtonFormat.AutoSize (property)

Gets and sets whether the button is automatically sized to fit the text.
Syntax: GefTriStateEnum = object.AutoSize
object.AutoSize = GefTriStateEnum
Description: When the button is set to auto size, attempts to change the size of the button(including by scaling animation) will not succeed.

The bounding of box of the button does change size and the button may actually change location depending on the anchor point of the resize operation.

Example:

Sub ButtonFormat_AutoSize()
    
    Dim oCimBtnSize As GefButtonFormat
    
    Set oCimBtnSize = CimGetObject.ButtonFormat
    
    Select Case oCimBtnSize.AutoSize
        Case gefStateFalse
            MsgBox "The button is not set to auto size"
        Case gefStateMixed
            MsgBox "The button is in a mixed state"
        Case gefStateTrue
            MsgBox "The button is set to auto size"
    End Select
    
End Sub