2007 Office Fluent Ribbon定制用户指南(连载11)

基本的控件
接下来的XML参考介绍基本的控件。
box
排列组里面的控件。
(1) 属性
通用:
getVisible,id,idQ,insertAfterMso,insertAfterQ,insertBeforeMso,insertBeforeQ,visible
表:box的属性

属性 描述
boxStyle Horizontal,Vertical 确定框里面控件的可视方向

(2) 子元素
box,button,buttonGroup,checkBox,comboBox,control,dropdown,dynamicMenu,editBox,
gallery,labelControl,menu,splitButton,toggleButton
button
代表一个按钮控件。
(1) 属性
通用:
description,enabled,getDescription,getEnabled,getImage,getImageMso,getKeytip,
getLabel,getScreentip,getShowImage,getShowLabel,getSize,getSupertip,getVisible,
id,idMso,idQ,image,imageMso,insertAfterMso,insertAfterQ,insertBeforeMso,
insertBeforeQ,keytip,label,onAction,screentip,showImage,showLabel,size,supertip,tag,visible
(2) 子元素

buttonGroup
代表一组按钮。
(1) 属性
通用:
getVisible,id,idQ,insertAfterMso,insertAfterQ,insertBeforeMso,insertBeforeQ,visible
(2) 子元素
button,control,dynamicMenu,gallery,menu,splitButton,toggleButton
checkBox
代表一个复选框控件。
(1) 属性
通用:
description,enabled,getDescription,getEnabled,getKeytip,getLabel,getScreentip,
getSupertip,getVisible,id,idMso,idQ,insertAfterMso,insertAfterQ,insertBeforeMso,
insertBeforeQ,keytip,label,onAction,screentip,supertip,tag,visible
表:复选框(checkBox)的属性

属性 类型或行为 描述
getPressed 回调 可使用户指定是否按下checkBox控件

(2) 子元素

comboBox
代表一个组合框控件。
(1) 属性
通用:
enabled,getEnabled,getImage,getImageMso,getKeytip,getLabel,
getScreentip,getShowImage,getShowLabel,getSupertip,getVisible,
id,idMso,idQ,image,imageMso,insertAfterMso,insertAfterQ,insertBeforeMso,
insertBeforeQ,label,screentip,showImage,showLabel,supertip,tag,visible
与编辑框(editBox)共享的属性:getText,maxLength,onChange,sizeString
表:组合框(comboBox)的属性和方法

方法 属性或方法 描述
getItemCount 回调 获取组合框(comboBox)中的项目数
getItemID 回调 获取该项目的ID
getItemImage 回调 获取该项目的图像
getItemLabel 回调 获取该项目的标签
getItemScreentip 回调 获取该项目的屏幕提示(ScreenTip)
getItemSupertip 回调 获取该项目的增加屏幕提示(Enhanced ScreenTip)
showItemImage True,False,1,0 指定是否显示项目图像

(2) 子元素
item


提示:您可以在评论中使用HTML标签,且任何与HTML标签相同的符号都会被理解为HTML标签并以相应的格式显示.如果您的评论中有代码,可以使用相应的标签,例如,如果有VB或VBA代码,则可以使用[vb]标签,即[vb]放置的代码[/vb],这样会很清晰地显示代码.

留下回复