LargeButtons プロパティ(ActiveX)

ツールバーのボタンの大小を指定します。

サポートされているプラットフォーム: Windows のみ

構文と要素

VBA:

object.LargeButtons
object

タイプ: ToolbarToolbars

このプロパティが適用されるオブジェクト。

プロパティの値

読み込み専用: はい(読み書き可能な Toolbars コレクションを除く)

タイプ: ブール型

注意

追加の注意はありません。

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."))
)