-
Notifications
You must be signed in to change notification settings - Fork 1
/
ui-textbox.Rmd
45 lines (34 loc) · 1.6 KB
/
ui-textbox.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
title: "TextBox"
output: html_document
---
**Inherits from [`OptionControl`](ui-optioncontrol.html)**
A textbox allows for the displaying and editing of the value of an option in text form.
##Properties
In addition to any inherited properties, a `TextBox` supports:
Property | Description | Form |
------------- | ------------------------------------------| -------------------- |
`format` | Sets the format definition that the `TextBox` should use to perform string manipulations with. If no format is specified `string` is assumed. | Name of a [standard format](ui-standard-formats.html)\
or a [custom format](ui-custom-format.html) include
`suffix` | Sets the text to be placed to the right of the textbox. | string
`inputPattern` | Sets the input string filter for determining valid inputs. For example, a number `TextBox` would have `inputPattern: '[0-9]+'` | regular expression string
`alignText` | Set the horizontal alignment of the text within the `TextBox`. | enum: left, center, right
`borderless` | Toggles whether the control has a visible border or not. This is mainly used when a `TextBox` is add to the `template` of a `ListBox`. | bool
## Supported Option Types ##
- `String`
- `Integer`
- `Number`
- Any format that has both toString() and parsing capabilities.
##Example
```{yaml}
- type: CheckBox
name: logOdds
children:
- type: TextBox
name: ciWidth
suffix: '%'
format: number
inputPattern: '[0-9]+'
enable: (logOdds)
```
The above example adds a `TextBox` as a child control to a `CheckBox`.