Share via


CommandBarControl 接口

定义

代表一个命令栏控件。

public interface class CommandBarControl : Microsoft::Office::Core::_IMsoOleAccDispObj
[System.Runtime.InteropServices.Guid("000C0308-0000-0000-C000-000000000046")]
public interface CommandBarControl : Microsoft.Office.Core._IMsoOleAccDispObj
[<System.Runtime.InteropServices.Guid("000C0308-0000-0000-C000-000000000046")>]
type CommandBarControl = interface
    interface _IMsoOleAccDispObj
Public Interface CommandBarControl
Implements _IMsoOleAccDispObj
派生
属性
实现

注解

CommandBarControl 对象是 集合的成员CommandBarControlsCommandBarControl 对象的属性和方法均由 CommandBarButtonCommandBarComboBoxCommandBarPopup 对象共享。

编写代码以使用自定义命令栏控件时,请使用 CommandBarButtonCommandBarComboBoxCommandBarPopup 对象。 在编写用于处理容器应用程序中的内置控件的代码时,如果该控件不能用上述三个对象中的任意一个来代表,则可以使用 CommandBarControl 对象。

使用 Controls (index) (其中 index 是控件的索引号)返回 CommandBarControl 对象。 (控件 Type 的 属性必须为 msoControlLabelmsoControlExpandingGridmsoControlSplitExpandingGridmsoControlGridmsoControlGauge.)

注意:可以为声明为 CommandBarControl 的 变量分配 CommandBarButtonCommandBarComboBoxCommandBarPopup 值。

还可以使用 FindControl(Object, Object, Object, Object, Object) 方法返回 CommandBarControl 对象。

属性

accChild[Object]

仅供内部使用。

accChildCount

仅供内部使用。

accDefaultAction[Object]

仅供内部使用。

accDescription[Object]

仅供内部使用。

accFocus

仅供内部使用。

accHelp[Object]

仅供内部使用。

accHelpTopic[String, Object]

仅供内部使用。

accKeyboardShortcut[Object]

仅供内部使用。

accName[Object]

仅供内部使用。

accParent

仅供内部使用。

accRole[Object]

仅供内部使用。

accSelection

仅供内部使用。

accState[Object]

仅供内部使用。

accValue[Object]

仅供内部使用。

Application

返回一个 Application 对象,该对象代表该对象的容器应用程序。

BeginGroup

确定指定的命令栏控件是否显示在命令栏上一组控件的开头。

BuiltIn

确定指定的命令栏控件是否是容器应用程序的内置控件。

Caption

返回或设置命令栏控件的描述文字文本。

Control

仅供内部使用。

Creator

返回一个 32 位整数,它指示在其中创建指定的对象的应用程序。

DescriptionText

返回或设置命令栏控件的说明。

Enabled

确定是否启用指定的命令栏控件。

Height

返回或设置命令栏控件的高度。

HelpContextId

返回或设置附加到命令栏控件的帮助主题的帮助上下文 ID 号。

HelpFile

返回或设置附加到命令栏控件的帮助主题的文件名。

Id

返回内置命令栏控件的 ID。

Index

返回一个 Integer 类型的值,表示集合中对象的索引号。

InstanceId

仅供内部使用。

IsPriorityDropped

根据使用情况统计信息和布局空间确定控件当前是否从菜单或工具栏中删除。

Left

返回指定命令栏控件 (相对于屏幕左边缘) 的水平位置(以像素为单位)。

OLEUsage

返回或设置合并两个 Microsoft Office 应用程序时将使用命令栏控件的 OLE 客户端和 OLE 服务器角色。

OnAction

返回或设置在用户单击或更改命令栏控件的值时将运行的过程的名称。

Parameter

返回或设置应用程序可用于执行命令的字符串。

Parent

返回指定对象的 Parent 对象。

Priority

返回或设置命令栏控件的优先级。

Tag

返回或设置有关命令栏控件的信息,例如可在过程中用作参数的数据,或标识控件的信息。

TooltipText

返回或设置命令栏控件的“屏幕提示”中显示的文本。

Top

返回从指定命令栏控件的上边缘到屏幕上边缘) (距离(以像素为单位)。

Type

返回命令栏控件的类型。

Visible

确定指定的对象是否可见。

Width

返回或设置指定命令栏控件) 宽度 ((以像素为单位)。

方法

accDoDefaultAction(Object)

仅供内部使用。

accHitTest(Int32, Int32)

仅供内部使用。

accLocation(Int32, Int32, Int32, Int32, Object)

仅供内部使用。

accNavigate(Int32, Object)

仅供内部使用。

accSelect(Int32, Object)

仅供内部使用。

Copy(Object, Object)

将一个命令栏控件复制到已有的命令栏中。

Delete(Object)

从其集合中删除指定的 对象。

Execute()

运行分配给指定命令栏控件的过程或内置命令。

Move(Object, Object)

将指定的命令栏控件移动到现有命令栏。

Reserved1()

仅供内部使用。

Reserved2()

仅供内部使用。

Reserved3()

仅供内部使用。

Reserved4()

仅供内部使用。

Reserved5()

仅供内部使用。

Reserved6()

仅供内部使用。

Reserved7()

仅供内部使用。

Reset()

将内置命令栏控件重置为其原始功能和面。

SetFocus()

将键盘焦点移动到指定的命令栏控件。

适用于