The Search Box has numerous properties available for configuration in the Properties pane. The following topic describes a basic workflow for configuring this control. The specific appearance and functionality of the object you create depends on your needs and implementation of the control's properties, each of which is described below.
Use the Settings pane to apply common settings (sizing, grouping, alignment, etc.) to this object (and others) on your screen.
The Style property defines the style sheet applied to an object on a screen. A style sheet consists of a predetermined list of properties and property values configured for a particular control type.
Styles are created in two ways:
Tip: You can also change a control's Style on the Controls view of the Screen pane.
The Include in script check box indicates that the control will appear in the objects collection of the screen (if scripting is enabled). To optimize performance, best practice dictates that you only include the controls you need to manipulate via script. Other controls should be excluded. When you add an event to a control, it will be automatically added to script and the Include in script property (and the In Script check box on the Controls view) will be set to True.
Tip: You can also change the Include in Script setting on the Controls view of the Screen pane.
Facility Search
- To configure a search box as a facility sender
- To configure a search box to navigate to another screen
- To configure a search box to execute a scripted selection action
Custom Search
The Height property specifies the height of the control (or screen).
Tip: You can also change the height of a control using the Settings pane (click on the
(Settings) to the right of the control in design mode) or on the Controls view of the Screen pane.
The Horizontal resize mode property specifies whether and how the control dynamically moves or resizes horizontally when the screen is resized in run mode. Options include:
The default value is None.
The Layer property specifies the layer for this control. Layers are used to show, hide, and edit multiple controls on one layer without affecting controls on another layer.
Tip: You can also edit a control's Layer on the Controls view of the Screen pane.
The Vertical resize mode property specifies whether and how the control dynamically moves or resizes vertically when the screen is resized in run mode. Options include:
The default value is None.
The Width property specifies the width of the control (or screen).
Tip: You can also change the width of a control using the Settings pane (click on the
(Settings) to the right of the control in design mode) or on the Controls view of the Screen pane.
The X property specifies the location of the control along the horizontal axis. Use the up, down, left, and right arrow keys to nudge a control by 1 pixel. Arrow moves a control by 1 pixel. Ctrl+Arrow moves a control by 10 pixels. Ctrl+Shift+Arrow moves a control by 100 pixels.
Tip: You can also change the location of the control using the Settings pane; click on the
(Settings) to the right of the control in design mode.
The Y property specifies the location of the control along the vertical axis. Use the up, down, left, and right arrow keys to nudge a control by 1 pixel. Arrow moves a control by 1 pixel. Ctrl+Arrow moves a control by 10 pixels. Ctrl+Shift+Arrow moves a control by 100 pixels.
Tip: You can also change the location of the control using the Settings pane; click on the
(Settings) to the right of the control in design mode.
The Z index property is used to determine the order in which controls are layered on top of each other. Controls with higher values will draw on top of those with lower values. The newest control added to a screen will always have the highest value and will be the top layer. Two or more controls can be on the same index (layer).
Tip: You can also change the Z index of a control using the Settings pane (click on the
(Settings) to the right of the control in design mode) or on the Controls view of the Screen pane.
|
When a full or partial facility name is entered, the search box will query all facilities in the provided service's associated Facility service and return any matching facility names. Select a facility from the search results and the search box will function as a facility sender and send the facility to any controls on the screen configured to receive it. This type of search does not require any scripting.
|
|
|
When a full or partial facility name is entered, the search box will query all facilities in the provided service's associated Facility service and return any matching facility names. Select a facility from the search results and the search box will navigate to the selected facility's associated screen or the selected screen. The navigation mode for the targeted screen is determined by the Facility navigation mode setting on the screen displaying the search box. There are six facility navigation modes for linking to associated screens; see Navigation by Facility for more information about navigating from a search box results. Most of the navigation modes do not required any scripting, although the Script event option does.
|
|
When a full or partial facility name is entered, the search box will query all facilities in the provided service's associated Facility service and return any matching facility names. Select a facility from the search results and the search box will execute a script event to perform some other action.
Use the Facility filter property to limit the data presented in the control to any CygNet filter attribute set up for your CygNet installation. A search will be executed against the facilities that are described by this filter. Click
to open the Facility Filter dialog box where you can create a custom filter rule. The filter rule is displayed in the property label; you do need to open the Facility Filter dialog box to edit the rule.
Use the Properties to Search property to select the facility properties that will be searched in the search box.
Searching many properties and searching non-indexed properties may negatively impact performance.
The default properties are Facility Description and Facility ID.
|
Custom searching is supported via script to allow you to query whatever you want, for example, a SQL database, a .csv file, even a web site. When a full or partial search term is entered in the search box, a custom script method is fired to search a specified item or object, and any matching terms are returned in a search results list. Further custom actions can be executed when selecting a search result.
|
|
See Scripting Custom Searches using a Search Box for the full script example.