FixedText.Dispatch Method | |
Provide the prototype dispatcher for events within the system when the control has focus; routing various events to their appropriate event handlers.
Namespace:
VO
Assembly:
VOGUIClasses (in VOGUIClasses.dll) Version: 2.19
Syntax VIRTUAL METHOD Dispatch(
oEvent
) AS USUAL CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public override Usual Dispatch(
Usual oEvent = default
)
Request Example
View SourceParameters
- oEvent (Optional)
- Type: Usual
The event to be handled.
Return Value
Type:
Usual
A numeric value representing the event handler to handle the event.
Remarks Tip |
---|
Important! This is a callback method used by X#.
Normally, it should not be called in your application code.
|
Controls receive events from the user and the system all of the time. Each control receives only the events that are relevant to it. For each event that is generated, two things happen:
1. The event is converted to a particular Event object (an ExposeEvent or a MouseEvent, for example) according to the action that triggered the event.
2. The appropriate event handler is called, and this typed Event object is passed to it.
Tip |
---|
If you want to set a specific return value for the underlying window procedure, you have to change the EventReturnValue variable for the control object.
If you want to handle other events (for example, timer events), you need to write your own Dispatch() method.
The following guidelines should be followed when writing a customized Dispatch() method:
1. Subclass an event type appropriate to the type of operation for which it is being used.
2. Add an event handler function to your derived object. (This event handler should be called with the event when the event is received.)
3. In general, the implementation of this event handler should call Default(). This keeps the same behavior as the base class, but it also allows other classes to provide useful event handlers for your new type of event, allowing you to provide a framework for other classes to use.
The base class Dispatch() method should be called in those cases where the received event is not handled by the customized dispatcher. For example:
1RETURN SUPER:Dispatch(<paramref name="oEvent" />) |
See Also