Go Up to Enabling Help in Applications
- Warning! RAD Studio does not provide an implementation of the IHelpSelector interface. To use methods of this interface, you need to provide your own implementation.
System.HelpIntfs.IHelpSelector is a companion to System.HelpIntfs.ICustomHelpViewer. When more than one registered viewer claims to provide support for a given keyword, context ID, or topic name or provides a table of contents, the Help Manager must choose between them. In the case of context IDs or topic names, the Help Manager always selects the first Help viewer that claims to provide support. In the case of keywords or the table of context, the Help Manager will, by default, select the first Help viewer. This behavior can be overridden by an application.
To override the decision of the Help Manager in such cases, an application must register a class that provides an implementation of the IHelpSelector interface. IHelpSelector exports two functions: SelectKeyword and TableOfContents. Both take as arguments a TStrings containing either the possible keyword matches or the names of the viewers claiming to provide a table of contents. The implementor is required to return the index (in the TStringList) that represents the selected string; the TStringList is then freed by the Help Manager.
- Note: The Help Manager may get confused if the strings are rearranged; it is recommended that implementors of IHelpSelector refrain from doing this. The Help system only supports one Help Selector; when new selectors are registered, any previously existing selectors are disconnected.