Click here for NewsObjects Overview
ShowSearchEditor Method (Utility Control)
Windows - Visual C++


Description
The ShowSearchEditor method displays a dialog box requesting multiple words and phrases. The dialog box contains Full View and Current View option buttons that enable the user to choose the view in which to apply the search. This dialog also allows the user of saving the search criteria or saving the criteria as a profile.

Syntax
long result = ShowSearchEditor();

The ShowSearchEditor syntax has these parts:

Part

Description

result

Return value. A long integer containing 0 if the user clicked the OK button and -1 if the user clicked the Cancel button.

Remarks

An initial search string can be inserted in the dialog before the dialog is displayed by setting the InitialSearchEditorSearchString property.

After the ShowSearchEditor method is called, the search string is stored in the SearchEditorSearchString property. This string is used to set the Headline control's SearchCriteria property. Note that the SearchEditorSearchString property is only valid if the return value from ShowSearchEditor is zero. If the user selects a date range criteria to be included in the search, the date range string is stored in SearchEditorDateString. This value is also only valid if ShowSearchEditor returns zero.

The Ticker, Subject, Source, and Expression dropdown buttons bring up dialogs allowing the user to select ticker, subject, or source (feed) codes, as well as complex expressions to be incorporated into the search.

The "Save As Search" drop down menu item allow the user to save the search criteria in a file in RPN format. In addition, the "Open Existing Search" drop down menu item allows the user to insert the contents of a previously saved search into the search criteria. The initial directory that is displayed in the "File Save" or "File Open" dialogs is the one specified by the PersonalFileLocation property.

The "Save As Alert Profiles" drop down menu item allow the user to save the search criteria as an alert profile. Consult the help section on alert profiles for more information.

The Full View and Current View option buttons enable the user to choose the view in which to apply the search. The ViewType property contains the search type selected in the "Apply To" group (1 = Full View, 2 = Current View). The DisableViewType property allows you to disable a view type option button.

The Full View option enables the user to perform the search on all stories in the NewsEdge Server database. No other search criteria is incorporated into the search. For example, if the user brings up the ShowSearchEditor dialog to perform a search and chooses Full View, the user will see all stories that match the search criteria.

The Current View option enables the user to perform the search on the current set of stories in the Headline View. For example, if the user performs a Source View on the news feed "AP" and then brings up the ShowSearchEditor dialog box to perform a search and chooses Current View, the user will see stories from the news feed "AP" that match the search criteria.

 Return to: Utility Methods