Type | Description | |||
String | A string expression that indicates the list of buttons being displayed. The rows are separated by chr(13)+chr(10) ( vbCrLf ) sequence, and the buttons inside the row are separated by ';' character. |
Each button supports built-in HTML format like follows:
or <font ;31><sha 404040;5;0><fgcolor=FFFFFF>outline anti-aliasing</fgcolor></sha></font> gets:
By default, the Buttons property is "<fgcolor=0000FF><b>7</b></fgcolor>;<fgcolor=0000FF><b>8</b></fgcolor>;<fgcolor=0000FF><b>9</b></fgcolor>;<fgcolor=FF0000>/</fgcolor>;C\r\n<fgcolor=0000FF><b>4</b></fgcolor>;<fgcolor=0000FF><b>5</b></fgcolor>;<fgcolor=0000FF><b>6</b></fgcolor>;<fgcolor=FF0000>*</fgcolor>;1/x\r\n<fgcolor=0000FF><b>1</b></fgcolor>;<fgcolor=0000FF><b>2</b></fgcolor>;<fgcolor=0000FF><b>3</b></fgcolor>;<fgcolor=FF0000>-</fgcolor>;sqrt\r\n<fgcolor=0000FF><b>0</b></fgcolor>;<fgcolor=0000FF><b>+/-</b></fgcolor>;<fgcolor=0000FF><b>.</b></fgcolor>;<fgcolor=FF0000>+</fgcolor>;<fgcolor=000080><b>=</b></fgcolor>"
Use the Caption property to access the control's caption. Use the Execute method to execute operations inside the control.
The following sample adds a new button 'sin' and execute the trigonometric sin function when 'sin' button is clicked:
Private Sub Form_Load() With CalcCombo1 .Buttons = .Buttons + vbCrLf + "<b>sin<b>" End With End Sub Private Sub CalcCombo1_ClickButton(ByVal Button As String, Cancel As Variant) If (Button = "sin") Then With CalcCombo1 .Execute Sin(.Caption) End With End If End Sub