• codejock 用法记录


    1、设置菜单字体大小,菜单高度不变

        RibbonBarActive.CommandBars.Options.Font.Size = 8     

    2、设置菜单字体大小,随菜单高度改变

            '系统皮肤
            Dim ControlOptions As XtremeCommandBars.CommandBarPopup
            Set ControlOptions = objRibbonBar.Controls.Add(xtpControlPopup, 0, "系统皮肤")
            ControlOptions.flags = xtpFlagRightAlign
           
            Dim Control2 As XtremeCommandBars.CommandBarControl
            Set Control = ControlOptions.CommandBar.Controls.Add(xtpControlPopup, 0, "皮肤风格")
            Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_STYLEBLUE2007, "Office 2007 Blue"
            Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_STYLESILVER2007, "Office 2007 Silver"
            Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_STYLEBLACK2007, "Office 2007 Black"
            Set Control2 = Control.CommandBar.Controls.Add(xtpControlButton, ID_OPTIONS_STYLEAQUA2007, "Office 2007 Aqua")
            Set Control2 = Control.CommandBar.Controls.Add(xtpControlButton, ID_OPTIONS_STYLEBLUE2010, "Office 2010 Blue")
            Control2.BeginGroup = True
            Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_STYLESILVER2010, "Office 2010 Silver"
            Set Control2 = Control.CommandBar.Controls.Add(xtpControlButton, ID_OPTIONS_STYLEBLACK2010, "Office 2010 Black")
            Set Control2 = Control.CommandBar.Controls.Add(xtpControlButton, ID_OPTIONS_STYLESCENIC7, "Windows 7 Scenic")
            Control2.BeginGroup = True
                        
    '        '字体大小
            Set Control = ControlOptions.CommandBar.Controls.Add(xtpControlPopup, 0, "字体大小")
            Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_FONT_SYSTEM, "系统字体"
            Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_FONT_NORMAL, "正常大小"
            Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_FONT_LARGE, "大字体"
            Set Control2 = Control.CommandBar.Controls.Add(xtpControlButton, ID_OPTIONS_FONT_EXTRALARGE, "特大字体")
            Set Control2 = Control.CommandBar.Controls.Add(xtpControlButton, ID_OPTIONS_FONT_AUTORESIZEICONS, "自动大小")

           Private Sub CommandBars1_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)

            Dim FontSizes(3) As Integer
            FontSizes(0) = 0
            FontSizes(1) = 11
            FontSizes(2) = 13
            FontSizes(3) = 16

            Case ID_OPTIONS_FONT_SYSTEM, ID_OPTIONS_FONT_NORMAL, ID_OPTIONS_FONT_LARGE, ID_OPTIONS_FONT_EXTRALARGE
                  Dim newFontHeight As Integer
                  newFontHeight = FontSizes(Control.id - ID_OPTIONS_FONT_SYSTEM)
                  RibbonBarActive.FontHeight = newFontHeight            
             Case ID_OPTIONS_FONT_AUTORESIZEICONS
                  CommandBars1.PaintManager.AutoResizeIcons = Not CommandBars1.PaintManager.AutoResizeIcons
                  CommandBars1.RecalcLayout
                  RibbonBarActive.RedrawBar

            end sub

  • 相关阅读:
    ActiveMQ( 一) 同步,异步,阻塞 JMS 消息模型
    rocketmq (一)运行原理以及使用问题
    Springboot+ActiveMQ(ActiveMQ消息持久化,保证JMS的可靠性,消费者幂等性)
    ActiveMQ(下载,启动,java程序中 如何操作)
    ActiveMQ(为什么要使用消息中间件,JMS传输模型)
    java(线程池的创建方式,和线程池的原理)
    java多线程
    Zookeeper实现负载均衡
    Zookeeper实现分布式锁
    SpringCloud-断路器(Hystrix)
  • 原文地址:https://www.cnblogs.com/czhelp/p/5005076.html
Copyright © 2020-2023  润新知