method Editor.AddButton (Key as Variant, [Image as Variant], [Align as Variant], [ToolTip as Variant], [ToolTipTitle as Variant], [ShortcutKey as Variant])
Adds a new button to the editor with specified key and aligns it to the left or right side of the editor.

TypeDescription
Key as Variant A Variant value that indicates the button's key. The ButtonClick event passes this value to Key parameter
Image as Variant A long expression that indicates the index of button's icon. The index is valid for Images collection. By default the button has no icon associated. Use the Images property to assign a list of icons to the control. 
Align as Variant An AlignmentEnum expression that defines the button's alignment.
ToolTip as Variant A string expression that indicates the the button's tooltip description. The tooltip shows up when cursor hovers the button. The ToolTip parameter may include built-in HTML tags.
ToolTipTitle as Variant A string expression that indicates the tooltip's title.
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.
Use the AddButton method to add multiple buttons to the editor.  Make sure that you are using unique keys for the buttons in the same editor, else the previous button is replaced. The editor doesn't allow two buttons with the same key. Use the ButtonWidth property to set the button's width. If the user clicks on one of the editor buttons, the ButtonClick event is fired. Use the RemoveButton method to remove a button that was previously added using the AddButton method. Use the ClearButtons method to clear the entire collection of buttons added with AddButton method. Use the Images property to assign a list of icons to the control.

The following VB sample adds some buttons to a CalculatorType editor:

With Record1
    .BeginUpdate
    .FieldHeight = 20
    .Images "gBJJgBAICAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwUrQGFADAxGDteGjcQib/suOwqAw+JxDAyuYxVhw2Tx8Zh+fx1Yx2Sw2XzIAz2e1Gbq+e0eh1uh2OQ0dL0u00OrzunxOmymo1uupW9ykTz/I3mU3O23WQoHNz+s3+y6uQ1HUzHD4lHz3Ix3ZxnP1XG0HO9HJmfS4Gp8PX93WzHL7tJ2Gh8H43fm6Xa86avY/bgvgxjGNQ97MQC6D6qM2rpvM/LIPpCKcv630Evk8qMwMyz4OlBjcPTCjlP4/TsMS5CcPa4UOu2xMCuO8byNvECoPJEbyQm/CfxZF0fNS8UNuPD6NMZGqqQdJMTPUo0eyBFsNSilkYSOrUbxuqcnSdKkoy5I0qqzByuO4mMuTBM6iy/NE1zYsCLB8lc4I8kCRJIACSpRPEVR3NqZIefw/o2SZ/n4D6NkAf58APQ4fnhPTVAecCVAGzSNgC46NgGldF0eAFF00jYHgBUCMmAB5gASjZ4A+eCUUKfgcsaH5/j2xsaICA"
    .BackColor = vbWhite
    With .Add("Calculator", CalculatorType)
        .Value = 3.14
        .ButtonWidth = 20
        .AddButton "A", 1, LeftAlignment
        .AddButton "B", 2, LeftAlignment
        .AddButton "C", 1, RightAlignment
        .AddButton "D", 2, RightAlignment
    End With
    .EndUpdate
End With

The following VC sample adds some buttons to a CalculatorType editor:

COleVariant vtMissing; vtMissing.vt = VT_ERROR;
m_record.Images( COleVariant( "gBJJgBAICAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwUrQGFADAxGDteGjcQib/suOwqAw+JxDAyuYxVhw2Tx8Zh+fx1Yx2Sw2XzIAz2e1Gbq+e0eh1uh2OQ0dL0u00OrzunxOmymo1uupW9ykTz/I3mU3O23WQoHNz+s3+y6uQ1HUzHD4lHz3Ix3ZxnP1XG0HO9HJmfS4Gp8PX93WzHL7tJ2Gh8H43fm6Xa86avY/bgvgxjGNQ97MQC6D6qM2rpvM/LIPpCKcv630Evk8qMwMyz4OlBjcPTCjlP4/TsMS5CcPa4UOu2xMCuO8byNvECoPJEbyQm/CfxZF0fNS8UNuPD6NMZGqqQdJMTPUo0eyBFsNSilkYSOrUbxuqcnSdKkoy5I0qqzByuO4mMuTBM6iy/NE1zYsCLB8lc4I8kCRJIACSpRPEVR3NqZIefw/o2SZ/n4D6NkAf58APQ4fnhPTVAecCVAGzSNgC46NgGldF0eAFF00jYHgBUCMmAB5gASjZ4A+eCUUKfgcsaH5/j2xsaICA" ) );
CEditor editor = m_record.Add(COleVariant("Calculator"), /*CalculatorType*/ 21, vtMissing );
editor.SetValue( COleVariant( 3.14 ) );
editor.SetButtonWidth(18);
editor.AddButton( COleVariant( "A" ), COleVariant( (long) 1 ), COleVariant( (long) 0 ), vtMissing, vtMissing, vtMissing );
editor.AddButton( COleVariant( "B" ), COleVariant( (long) 2 ), COleVariant( (long) 1 ), vtMissing, vtMissing, vtMissing );
editor.AddButton( COleVariant( "C" ), COleVariant( (long) 1 ), COleVariant( (long) 1 ), vtMissing, vtMissing, vtMissing );
editor.AddButton( COleVariant( "D" ), COleVariant( (long) 2 ), vtMissing, vtMissing, vtMissing, vtMissing );