Text Boxes
What is a Text Box Component?
A Text Box component is a standard user interface (UI) element commonly used in developer frameworks such as Windows Presentation Foundation (WPF). It provides a field in which users can enter, edit, or display plain text. Text Boxes are ideal for collecting user input such as names, descriptions, or other freeform values that are not limited to predefined selections.
Text Box components support various formatting options and validation rules, enabling developers to guide and constrain user input as needed. They can be configured to accept single-line or multi-line input and may include visual cues like placeholder text to indicate expected values. In many applications, Text Boxes are paired with labels or tooltips to provide additional context and improve accessibility.
When to use
The Text Box component is ideal for collecting and displaying user-entered text within dashboards and applications. It provides a straightforward way for users to input information that is not constrained to a predefined set of values. Text Boxes are best used when flexibility, user customization, or freeform entry is required.
- Freeform Input: Use a Text Box when users need to enter custom information such as names, comments, or descriptions that cannot be captured through fixed selections.
- Single or Multi-Line Entry: Choose a Text Box when collecting either short single-line values or extended multi-line content.
- Data Entry Forms: Ideal for forms that require user-supplied values to be passed into parameters, saved to the database, or used in conditional business rules.
- Parameter Binding: Use a Text Box when you want to bind directly to a parameter and allow the user to change that value through typed input.
- Inline Editing: Place a Text Box in a dashboard when in-place editing is required without navigating to a separate modal or page.
Examples
- Use a Text Box to capture a user’s name as part of a profile creation form and pass the value to a parameter for backend processing.
- Include a Text Box to allow users to input a custom filter value that drives a data query or report generation process.
When not to use
- Predefined Options: Do not use a Text Box when the input should be limited to a specific set of values. In these cases, use a Combo Box, List Box, or set of Radio Buttons to restrict user input and prevent errors.
- Numerical Input with Constraints: If you're collecting strictly formatted numeric values consider using specialized input components like a Date Selector to enforce format consistency and validation.
- Triggering Actions: Avoid using a Text Box as a substitute for action-oriented components like buttons. Text Boxes should be used solely for data entry, not for initiating processes.
- Non-Editable Display: If the value should only be displayed and not modified by the user, use a Label or other static content instead of a Text Box.
- Secure Entry Requirements: If the value being entered is sensitive, consider using a Password Box component, which obscures the text as it is typed.
Formatting
- Text: Text that appears in the label attached to the Text Box
- Tool Tip: Explanatory text that appears when the user hovers over the Text Box
- Display Format: Allows the user to configure formatting items like
IsReadOnly
,Width
,Height
,LabelFontFamily
,LabelTextColor
,LabelPosition
, etc.
Action
Bound Parameter: Attach a Parameter to the Text Box component, to be populated by the user-entered value.
Text Box Properties
- Allow Rich Text: Allow special formatting of content using rich text (font, color, alignment, etc.)
- Enable Spell Check: Displays the spell check options in the toolbar when “Allow Rich Text” is set to “True.”
- Multiline: Allows the Text Box component to properly display and process handle multi-line text input, as opposed to the default single-line text input.
Create a Text Box
- Click Application > Presentation > Workspaces
- Expand the Workspace and Dashboard Maintenance Unit where the Grid View will be created, then click Components.
- Click Create Dashboard Component in the dashboard toolbar.
- Select Text Box from the dialog then click OK.
- In Name and Description, enter a name and description for the Text Box component. Do not use special characters or dashes (-) in names.
- Configure the Text field. This will be the text to display in the Label attached to the Text Box, if the user chooses to utilize this formatting property. If using a literal value parameter, be sure to enclose the name in pipes and exclamation points. For example,
|!EntityParam!|
. - Click Save.
- Add the Text Box component to a Dashboard.
- Click Save.
- Test the Dashboard by clicking View Dashboard. The Dashboard with the Label will be displayed in OneStream.