Type | Description | |||
Key as Variant | A string expression that indicates the key of the button clicked. |
The ButtonClick event notifies your application that the user clicks a button. The AddButton method adds a new button to the editor. Also, the ButtonClick event is fired when user clicks the drop down button of an editor of one of the following types: DropDown, DropDownList, CheckList, Date, Color, Font, Picture, PickEdit and Button . In this case, the Key parameter is an empty string.
Syntax for ButtonClick event, /NET version, on:
private void ButtonClick(object sender,object Key) { } Private Sub ButtonClick(ByVal sender As System.Object,ByVal Key As Object) Handles ButtonClick End Sub |
private void ButtonClick(object sender, AxEXEDITORSLib._IEditorEvents_ButtonClickEvent e) { } void OnButtonClick(VARIANT Key) { } void __fastcall ButtonClick(TObject *Sender,Variant Key) { } procedure ButtonClick(ASender: TObject; Key : OleVariant); begin end; procedure ButtonClick(sender: System.Object; e: AxEXEDITORSLib._IEditorEvents_ButtonClickEvent); begin end; begin event ButtonClick(any Key) end event ButtonClick Private Sub ButtonClick(ByVal sender As System.Object, ByVal e As AxEXEDITORSLib._IEditorEvents_ButtonClickEvent) Handles ButtonClick End Sub Private Sub ButtonClick(ByVal Key As Variant) End Sub Private Sub ButtonClick(ByVal Key As Variant) End Sub LPARAMETERS Key PROCEDURE OnButtonClick(oEditor,Key) RETURN |
<SCRIPT EVENT="ButtonClick(Key)" LANGUAGE="JScript"> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> Function ButtonClick(Key) End Function </SCRIPT> Procedure OnComButtonClick Variant llKey Forward Send OnComButtonClick llKey End_Procedure METHOD OCX_ButtonClick(Key) CLASS MainDialog RETURN NIL void onEvent_ButtonClick(COMVariant _Key) { } function ButtonClick as v (Key as A) end function function nativeObject_ButtonClick(Key) return |
The following sample displays the key of the button that user clicked:
Private Sub Editor1_ButtonClick(ByVal Key As Variant) Debug.Print "The user clicks the " & IIf(Key = "", "drop down", "'" & Key & "'") & " button" End Sub Private Sub Form_Load() With Editor1 .EditType = DropDownList .AddItem 1, "One" .AddItem 2, "Two" .AddButton "KeyA", 1 .Value = 1 End With End Sub