Creating a Button
The most basic control and the control you'll use most often is the button which, when clicked, runs a macro that you specify:
<button id="value"
label="value"
imageMso="value"
size="normal|large"
InsertAfterMso="value"
InsertBeforeMso="value"
onAction="value"
enabled="true|false"
visible="true|false"
screentip="value"
supertip="value"
keytip="value" />
Here's an example:
<button id="CustomButton1" imageMso="HappyFace" label="Hello World!" size="large" onAction="Module1.MyButton" screentip="Hello World" supertip="Displays the canonical Hello World! message." keytip="M" />
In this tutorial:
- Creating Custom Controls
- Common Control Attributes
- Creating a Button
- Creating a Menu
- Creating a Split Button
- Creating a Check Box
- Creating a Toggle Button
- Creating a Drop-Down List
- Creating a Gallery
- Creating a Combo Box
- Creating a Dialog Launcher
- Working with Ribbon Commands at Runtime
- Initializing Controls
- Resetting Controls
- Getting and Changing Control Values