Breyta

Deila með


Control.QueryAccessibilityHelp Event

Definition

Occurs when AccessibleObject is providing help to accessibility applications.

public:
 event System::Windows::Forms::QueryAccessibilityHelpEventHandler ^ QueryAccessibilityHelp;
public event System.Windows.Forms.QueryAccessibilityHelpEventHandler QueryAccessibilityHelp;
public event System.Windows.Forms.QueryAccessibilityHelpEventHandler? QueryAccessibilityHelp;
member this.QueryAccessibilityHelp : System.Windows.Forms.QueryAccessibilityHelpEventHandler 
Public Custom Event QueryAccessibilityHelp As QueryAccessibilityHelpEventHandler 

Event Type

Examples

The following code example demonstrates the creation of an accessibility-aware chart control, using the AccessibleObject and Control.ControlAccessibleObject classes to expose accessible information. The control plots two curves along with a legend. The ChartControlAccessibleObject class, which derives from ControlAccessibleObject, is used in the CreateAccessibilityInstance method to provide custom accessible information for the chart control. Since the chart legend is not an actual Control -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the ChartControlAccessibleObject class overrides the GetChild method to return the CurveLegendAccessibleObject that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information.

This code excerpt demonstrates handling the QueryAccessibilityHelp event. See the AccessibleObject class overview for the complete code example.

// Handles the QueryAccessibilityHelp event.
void ChartControl_QueryAccessibilityHelp( Object^ /*sender*/, System::Windows::Forms::QueryAccessibilityHelpEventArgs^ e )
{
   e->HelpString = "Displays chart data";
}
// Handles the QueryAccessibilityHelp event.
private void ChartControl_QueryAccessibilityHelp(object sender, 
                            System.Windows.Forms.QueryAccessibilityHelpEventArgs e)
{            
    e.HelpString = "Displays chart data";
}
' Handle the QueryAccessibilityHelp event.
Private Sub ChartControl_QueryAccessibilityHelp(sender As Object, _
                   e As System.Windows.Forms.QueryAccessibilityHelpEventArgs) Handles MyBase.QueryAccessibilityHelp
    e.HelpString = "Displays chart data"
End Sub

Remarks

You should use the HelpProvider class to enable users to invoke help on your accessible object by pressing the F1 key. Using the HelpProvider provides you with complete information in the QueryAccessibilityHelpEventArgs. For more information about handling events, see Handling and Raising Events.

Applies to

See also