Is there any event that occurs if the user opens the controls context window ( CTRL + SPACE )?
The version 1.0.3.4 introduces the OnContext event that’s fired if the control is not read only, and the user opens the control’s context menu ( pressing the CTRL + SPACE key combination ). The OnContext event passes the context string and the position where the context begins. Use the OnContext event to notify your application that the user asks for a context. For instance, during the OnContext event you can add a collection of the items, based on the context you have, using the Add method of the Context object. Use the CaretPos and CaretLine properties to determine the position of the cursor inside the text. Use the TextLine property to retrieve line at the cursor. The following sample displays the current line when the OnContext event occurs: Private Sub Edit1_OnContext(ByVal Start As Long, ByVal Context As String) With Edit1 Debug.Print “Current line: ” & .TextLine(.
Related Questions
- Why should not the user close the popup control window which appears after the authentication with the CaptivePortal?
- A controls Validating event is hit even when the user clicks on the Close box. How can I avoid this behavior?
- Is there any event that occurs if the user opens the controls context window ( CTRL + SPACE )?