LargeButtons Property (ActiveX)

Specifies whether the toolbar button is large or small.

Supported platforms: Windows only

Signature

VBA:

object.LargeButtons
object

Type: Toolbar, Toolbars

The objects this property applies to.

Property Value

Read-only: Yes; except for the Toolbars collection which is read-write

Type: Boolean

Remarks

No additional remarks.

Examples

VBA:

Sub Example_LargeButtons()
    ' This example uses MenuGroups to obtain a reference to the AutoCAD main menu.
    ' It then creates a new Toolbar (TestMenu) and inserts a ToolBarButton
    ' into it.  It then sets the LargeButtons property to change the visible style
    ' of all the system Toolbars
    
    Dim CurrSize As Boolean, ButtonSize As String
    Dim Toolbars As AcadToolbars

    ' Make the system Toolbar buttons bigger
    Set Toolbars = ThisDrawing.Application.MenuGroups("ACAD").Toolbars
   
    ' Get current size
    CurrSize = Toolbars.LargeButtons
    
    ' Display current Toolbar size
    GoSub DISPLAY
   
    ' Toggle Toolbar size
    Toolbars.LargeButtons = Not (Toolbars.LargeButtons)
    
    ' Display current Toolbar size
    GoSub DISPLAY
    
    ' Reset to original value
    Toolbars.LargeButtons = CurrSize
    
    ' Display current Toolbar size
    GoSub DISPLAY

    Exit Sub
    
DISPLAY:
    ' Display button style
    ButtonSize = IIf(Toolbars.LargeButtons, "Large", "Normal size")
    MsgBox "We are displaying " & ButtonSize & " buttons.", vbInformation

    Return
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_LargeButtons()
    ;; This example uses MenuGroups to obtain a reference to the AutoCAD main menu.
    ;; It then creates a new Toolbar (TestMenu) and inserts a ToolBarButton
    ;; into it.  It then sets the LargeButtons property to change the visible style
    ;; of all the system Toolbars
    (setq acadObj (vlax-get-acad-object))
    
    ;; Make the system Toolbar buttons bigger
    (setq Toolbars (vla-get-Toolbars (vla-Item (vla-get-MenuGroups acadObj) "ACAD")))
   
    ;; Get current size
    (setq CurrSize (vla-get-LargeButtons Toolbars))
    
    ;; Display current Toolbar size
    (setq ButtonSize (if (= CurrSize :vlax-true) "Large" "Normal size"))
    (alert (strcat "We are displaying " ButtonSize " buttons."))
   
    ;; Toggle Toolbar size
    (vla-put-LargeButtons Toolbars (if (= (vla-get-LargeButtons Toolbars) :vlax-true) :vlax-false :vlax-true))
    
    ;; Display current Toolbar size
    (setq ButtonSize (if (= (vla-get-LargeButtons Toolbars) :vlax-true) "Large" "Normal size"))
    (alert (strcat "We are displaying " ButtonSize " buttons."))
    
    ;; Reset to original value
    (vla-put-LargeButtons Toolbars CurrSize)
    
    ;; Display current Toolbar size
    (setq ButtonSize (if (= CurrSize :vlax-true) "Large" "Normal size"))
    (alert (strcat "We are displaying " ButtonSize " buttons."))
)