LargeButtons 属性 (ActiveX) 
指定工具栏按钮是大还是小。 支持的平台:仅限 Windows 属性值只读:是的;除了读写的集合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
可视化 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."))
)
 | 
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
GMT+8, 2025-11-4 14:18
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.