

| Type | Description | |||
| Key as Variant | A Variant expression that indicates the key of the button being added. | |||
| Image as Variant | A long expression that indicates the index of icon being displayed in the button. | |||
| Align as Variant | An AlignmentEnum expression that indicates the button's alignment inside the node. | |||
| ToolTip as Variant | A string expression that indicates the button's tooltip. The button's tooltip shows up when user hovers the cursor over the button. The ToolTip value accepts built-in HTML format like described in the Remarks paragraf. | |||
| ToolTipTitle as Variant | A string expression that indicates the title of the button's tooltip. | |||
| ShortcutKey as Variant | A short expression that indicates the shortcut key being used to simulate clicking the button. The lower byte indicates the code of the virtual key, and the higher byte indicates the states for SHIFT, CTRL and ALT keys ( last insignificant bits in the higher byte ). The ShortcutKey expression could be 256 *( ( shift ? 1 : 0 ) + (ctrl ? 2 : 0 ) + (alt ? 4 : 0) ) + vbKeyCode, For instance, a combination like CTRL + F3 is 256 * 2 + vbKeyF3, SHIFT + CTRL + F2 is 256 *(1 + 2) + vbKeyF2, and SHIFT + CTRL + ALT + F5 is 256 * (1 + 2 + 4) + vbKeyF5. |
The following sample displays a message box when user clicks the 'A' button:
Private Sub Form_Load()
With XMLGrid1
.BeginUpdate
With .Editors
With .Add("Spin")
.ButtonWidth = 18
.EditType = SpinType
.AddButton "A", 1
End With
End With
With .Nodes
With .Add("Spin", 1)
.Editor = "Spin"
End With
End With
.EndUpdate
End With
End Sub
Private Sub XMLGrid1_ButtonClick(ByVal Node As EXMLGRIDLibCtl.INode, ByVal Key As Variant)
If Key = "A" Then
MsgBox "You have clicked the 'A' button."
End If
End Sub
The control uses built-in HTML tags to display the caption using HTML format.
The control supports the following HTML tags:



or <font ;31><sha 404040;5;0><fgcolor=FFFFFF>outline anti-aliasing</fgcolor></sha></font> gets:
