DataWindow.FocusChange Method | |
Provide a method that is invoked when the input focus changes from the current data window to another window (or vice versa).
Namespace:
VO
Assembly:
VOGUIClasses (in VOGUIClasses.dll) Version: 2.19
Syntax VIRTUAL METHOD FocusChange(
oFocusChangeEvent
) AS USUAL CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public override Usual FocusChange(
Usual oFocusChangeEvent = default
)
Request Example
View SourceParameters
- oFocusChangeEvent (Optional)
- Type: Usual
The FocusChangeEvent object that identifies whether the focus is being gained or lost.
Return Value
Type:
UsualRemarks Tip |
---|
Important! This is a callback method used by X#.
Normally, it should not be called in your application code.
|
If your data window uses cursors, you should hide the data window's cursor when the focus is changed to a different data window, and then show the cursor when the data window receives focus again. This should be used in conjunction with the Activate() and Deactivate() event handlers.
Examples
This example demonstrates how FocusChange() displays the cursor at the specified cursor position when focus is gained. If the focus is lost, the cursor is hidden:
1METHOD FocusChange(oFocusChangeEvt) CLASS MyDataWindow
2IF oFocusChangeEvt:GotFocus
3oMyCursor:Show()
4oMyCursor:ChangePos(oMyCursorPos)
5ELSE
6oMyCursorPos := oMyCursor:GetPos()
7oMyCursor:Hide()
8ENDIF
See Also