zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    QT开发之旅一DS7400主机调试工具
    读《程序员,你伤不起》杂感(附带分享两个项目源码)
    这些年过上幸福生活的程序员(中篇)
    这些年过上幸福生活的程序员(上篇)
    如果第三方数据表与系统数据库里的表名格式不一致的解决方案
    数据库设计原则
    MYSQL密码设置
    关于phpmyadmin #1045无法登陆服务器的问题
    TP快捷函数
    跨控制器调用
  • 原文地址:https://www.cnblogs.com/czhelp/p/5005076.html
Copyright © 2011-2022 走看看