各种输入小部件和表单控件。
AutocompleteInput
基类:bokeh.models.widgets.inputs.TextInput
bokeh.models.widgets.inputs.TextInput
具有自动完成功能的单行输入控件。
align
属性类型: Either ( Enum ( Align ) Tuple ( Enum ( Align ) Enum ( Align ) ) )
Either
Enum
Align
Tuple
父容器中的对齐点。
如果布局是这个元素的一个子元素,那么这个布局是有用的。自对齐可以被父容器覆盖(例如网格跟踪对齐)。
aspect_ratio
属性类型: Either ( Enum (枚举(自动)), Float )
Float
描述组件的宽度和高度之间的比例关系。
如果任何一个组件的尺寸在尺寸上是灵活的,这就可以了。如果设置为数字, width / height = aspect_ratio 关系将得到维持。否则,如果设置为 "auto" ,组件的首选宽度和高度将用于确定纵横比(如果未设置,则不保留纵横比)。
width / height = aspect_ratio
"auto"
background
属性类型: Color
Color
组件的背景色。
case_sensitive
属性类型: Bool
Bool
启用或禁用区分大小写
completions
属性类型: List ( String )
List
String
完成字符串的列表。这将用于指导用户键入所需值的开头。
css_classes
要添加到此DOM元素的CSS类名的列表。注意:类名只是按原样添加,不提供其他保证。
也允许从元组赋值,但是这些元组是经过调整的——属性将始终包含一个列表。
default_size
属性类型: Int
Int
主维度中的默认大小(宽度或高度)。
主导维度由控件方向决定。
disabled
小部件在呈现时是否被禁用。
如果 True ,小部件将变灰,并且不会响应UI事件。
True
height
属性类型: NonNegativeInt
NonNegativeInt
高度(像素)。
这可以是固定高度,也可以是首选高度,具体取决于高度大小调整策略。
height_policy
属性类型: Either ( Auto , Enum ( SizingPolicy ) )
Auto
SizingPolicy
描述组件应如何保持其高度。
使用组件的首选大小策略。
"fixed"
准确使用 height 像素。如果组件不能容纳在可用的垂直空间中,它将溢出。
"fit"
使用组件的首选高度(如果设置)并允许在最小和最大高度边界(如果设置)内适合可用的垂直空间。组件的高度既不会被激进地最小化也不会被最大化。
"min"
使用尽可能少的垂直空间,不小于最小高度(如果设置)。起点是首选高度(如果设置)。组件的高度可能会收缩或增长,这取决于父布局、方面管理和其他因素。
"max"
使用尽可能多的垂直空间,不超过最大高度(如果设置)。起点是首选高度(如果设置)。组件的高度可能会收缩或增长,这取决于父布局、方面管理和其他因素。
注解
这是一个实验特性,将来可能会改变。你可以随意使用。喜欢使用 sizing_mode 如果这种程度的控制不是绝对必要的。
sizing_mode
js_event_callbacks
属性类型: Dict ( String , List ( Instance ( CustomJS ) ) )
Dict
Instance
CustomJS
事件名称到列表的映射 CustomJS 回调。
通常,应该使用 Model.js_on_event 方法:
Model.js_on_event
callback = CustomJS(code="console.log('tap event occurred')") plot.js_on_event('tap', callback)
js_property_callbacks
属性名到列表的映射 CustomJS 回调,在创建文档时在BokehJS侧设置。
通常,应该使用 Model.js_on_change 方法:
Model.js_on_change
callback = CustomJS(code="console.log('stuff')") plot.x_range.js_on_change('start', callback)
margin
属性类型: Tuple ( Int , Int , Int , Int )
允许在组件周围创建额外的空间。元组中的值按如下顺序排列-上边距、右边距、下边距和左边距,类似于CSS标准。负边距值可用于从任何方向收缩空间。
max_height
如果高度可调,组件的最大高度(以像素为单位)。
max_width
如果宽度可调,组件的最大宽度(以像素为单位)。
min_characters
属性类型: PositiveInt
PositiveInt
显示完成之前用户必须键入的字符数。
min_height
如果高度可调,组件的最小高度(以像素为单位)。
min_width
如果宽度可调,组件的最小宽度(以像素为单位)。
name
属性类型: String
用户为此模型提供的任意名称。
当查询文档以检索特定的Bokeh模型时,这个名称非常有用。
>>> plot.circle([1,2,3], [4,5,6], name="temp") >>> plot.select(name="temp") [GlyphRenderer(id='399d53f5-73e9-44d9-9527-544b761c7705', ...)]
对于提供的任何名称,不提供唯一性保证或其他条件,Bokeh也不以任何理由直接使用该名称。
orientation
属性类型: Enum (枚举(水平、垂直))
水平(默认)或垂直调整小部件的方向。
注意并不是所有的小部件都支持垂直方向。
placeholder
空输入字段的占位符。
属性类型: Enum ( SizingMode )
SizingMode
组件的大小。
这是一个高级设置,用于保持组件的宽度和高度。要获得对大小的更细粒度控制,请使用 width_policy , height_policy 和 aspect_ratio 相反(这些优先于 sizing_mode )
width_policy
可能的情况:
组件没有响应。它将保留其原始的宽度和高度,而不考虑任何后续的浏览器窗口调整事件。
"stretch_width"
组件将相应地调整大小以拉伸到可用的宽度,而不保持任何宽高比。组件的高度取决于组件的类型,可以固定或适合组件的内容。
"stretch_height"
组件将相应地调整大小以拉伸到可用的高度,而不保持任何纵横比。组件的宽度取决于组件的类型,可以固定或适合组件的内容。
"stretch_both"
如果纵横比是独立的,那么纵横比会完全占据垂直部分的空间。
"scale_width"
组件将相应地调整大小以拉伸到可用的宽度,同时保持原始或提供的纵横比。
"scale_height"
组件将相应地调整大小以拉伸到可用高度,同时保持原始或提供的纵横比。
"scale_both"
组件将相应地调整到可用的宽度和高度,同时保持原始或提供的纵横比。
subscribed_events
Python回调订阅的事件列表。对于这个模型,这是一组将从BokehJS传递回Python的事件。
tags
属性类型: List ( Any )
Any
附加到此模型的任意用户提供的值的可选列表。
当查询文档以检索特定的Bokeh模型时,此数据非常有用:
>>> r = plot.circle([1,2,3], [4,5,6]) >>> r.tags = ["foo", 10] >>> plot.select(tags=['foo', 10]) [GlyphRenderer(id='1de4c3df-a83d-480a-899b-fb263d3d5dd9', ...)]
或者简单地将任何必要的元数据附加到可以通过 CustomJS 回调等。
对于所提供的任何标签,不存在唯一性保证或其他条件,Bokeh也不以任何理由直接使用这些标签。
title
小工具的标签。
value
初始或输入的文本值。
只要按下<enter>就会触发更改事件。
value_input
初始值或当前值。
任何更新发生时,即每次按键时,都会触发更改事件。
visible
组件是否可见以及是否是布局的一部分。
width
组件的宽度(以像素为单位)。
这可以是固定宽度,也可以是首选宽度,具体取决于宽度大小调整策略。
描述组件应如何保持其宽度。
准确使用 width 像素。如果组件不能容纳在可用的水平空间中,它将溢出。
使用组件的首选宽度(如果设置),并允许它在最小和最大宽度范围内(如果设置)适合可用的水平空间。组件的宽度既不会被积极地最小化也不会被最大化。
尽可能少地使用水平空间,不小于最小宽度(如果设置)。起点是首选宽度(如果设置)。组件的宽度可能会根据父布局、方面管理和其他因素而缩小或增大。
使用尽可能多的水平空间,不超过最大宽度(如果设置)。起点是首选宽度(如果设置)。组件的宽度可能会收缩或增长,这取决于父布局、方面管理和其他因素。
apply_theme
应用一组主题值,这些值将被使用而不是默认值,但不会覆盖应用程序集值。
传入的字典可以保持原样,并与其他实例共享以节省内存(因此无论是调用方还是 HasProps 实例应该修改它)。
HasProps
property_values (dict) -- 主题值用于替代默认值
没有
dataspecs
收集所有人的名字 DataSpec 类的属性。
DataSpec
这种方法 总是 遍历类层次结构并包含在任何父类上定义的属性。
名称 DataSpec 性质
set[str]
dataspecs_with_props
收集一张记录所有人姓名的字典 DataSpec 类的属性。
名称和 DataSpec 性质
dict[str, DataSpec]
equals
模型的结构相等。
other (HasProps) -- 要比较的另一个实例
如果属性在结构上相等,则为True,否则为False
js_link
使用JavaScript链接两个Bokeh模型属性。
这是一种方便的方法,它简化了添加一个CustomJS回调,以便在另一个Bokeh模型属性更改值时更新它。
attr (str) -- 此模型上的Bokeh属性的名称
other (Model) -- 要链接到的Bokeh模型自我属性
other_attr (str) -- 上的财产 other 连接在一起
other
attr_selector (Union[int, str]) -- 链接可订阅项中的项的索引 attr
attr
在版本1.1中添加
ValueError --
实际案例
此代码与 js_link :
select.js_link('value', plot, 'sizing_mode')
相当于:
from bokeh.models import CustomJS select.js_on_change('value', CustomJS(args=dict(other=plot), code="other.sizing_mode = this.value" ) )
此外,要使用属性选择器将范围滑块的左侧附加到绘图的x_范围:
range_slider.js_link('value', plot.x_range, 'start', attr_selector=0)
from bokeh.models import CustomJS range_slider.js_on_change('value', CustomJS(args=dict(other=plot.x_range), code="other.start = this.value[0]" ) )
js_on_change
附A CustomJS 对任意BokehJS模型事件的回调。
在BokehJS方面,模型属性的更改事件具有以下形式 "change:property_name" . 为了方便起见,如果传递给此方法的事件名也是模型上某个属性的名称,那么它的前缀将是 "change:" 自动:
"change:property_name"
"change:"
# these two are equivalent source.js_on_change('data', callback) source.js_on_change('change:data', callback)
但是,除了属性更改事件之外,还有其他类型的事件可以用来响应。例如,每当数据流式传输到 ColumnDataSource 使用 "stream" 源上的事件:
ColumnDataSource
"stream"
source.js_on_change('streaming', callback)
layout
lookup
找到 PropertyDescriptor 对于类上的Bokeh属性,给定属性名。
PropertyDescriptor
name (str) -- 要搜索的属性的名称
名为的属性的描述符 name
on_change
在此对象上添加回调以在 attr 变化。
attr (str) -- 此对象的属性名
*callbacks (callable) -- 要注册的回调函数
例子:
widget.on_change('value', callback1, callback2, ..., callback_n)
properties
收集此类的属性名称。
这种方法 任选地 遍历类层次结构并包含在任何父类上定义的属性。
with_bases (bool, optional) -- 是否在结果中包含在父类上定义的属性。(默认值:True)
属性名称
properties_containers
收集此类上所有容器属性的名称。
容器属性名称
properties_with_refs
收集该类上也有引用的所有属性的名称。
具有引用的属性的名称
properties_with_values
收集将属性名称映射到其值的dict。
跳过不可序列化的属性,属性值采用“序列化”格式,这可能与通常从属性中读取的值略有不同;此方法的目的是返回无损重建对象实例所需的信息。
include_defaults (bool, optional) -- 是否包含自创建对象后尚未显式设置的属性。(默认值:True)
从属性名到属性值的映射
dict
query_properties_with_values
查询的属性值 HasProps 带有谓词的实例。
query (callable) -- 接受属性描述符并返回True或False的可调用文件
include_defaults (bool, optional) -- 是否包含尚未由用户显式设置的属性(默认值:True)
为匹配的属性映射属性名称和值
references
返回全部 Models 此对象引用的。
Models
remove_on_change
从此对象中删除回调
select
查询此对象及其所有引用以查找与给定选择器匹配的对象。
selector (JSON-like) --
SEQ [模型]
select_one
查询此对象及其所有引用以查找与给定选择器匹配的对象。如果找到多个对象,则引发错误。返回单个匹配的对象,如果找不到任何对象,则返回无:param selector::type selector:JSON like
模型
set_from_json
从JSON设置此对象的属性值。
name -- (str):要设置的属性的名称
json -- (JSON value):要设置为的属性的值
models (dict or None, optional) -- 模型ID到模型的映射(默认值:无)在要更新的属性也有引用的值的情况下,需要这样做。
setter (ClientSession or ServerSession or None, optional) -- 这是用来防止“飞镖”更新到博克应用程序。在Bokeh服务器应用程序的上下文中,对属性的传入更新将使用正在进行更新的会话进行注释。此值通过更新触发的任何后续更改通知传播。会话可以将事件设置程序与其自身进行比较,并禁止任何源自自身的更新。
set_select
更新与具有指定属性/值的给定选择器匹配的对象将更新。
updates (dict) --
themed_values
获取任何主题提供的覆盖。
结果以dict形式从属性名返回到值,或者 None 如果没有主题覆盖此实例的任何值。
None
不记名
to_json
返回此对象属性的字典,只包含“JSON类型”(string、number、boolean、none、dict、list)。
对其他对象的引用被序列化为“refs”(只是对象ID和类型信息),因此反序列化程序需要单独拥有这些其他对象的完整属性。
没有对应的 from_json() 因为反序列化对象通常是在文档上下文中完成的(因为文档可以解析引用)。
from_json()
在大多数情况下,最好序列化和反序列化整个文档。
include_defaults (bool) -- 是否包含未从默认值更改的属性
to_json_string
返回编码此对象属性的JSON字符串。
对其他对象的引用被序列化为引用(仅对象ID和类型信息),因此反序列化程序将需要单独拥有这些其他对象的完整属性。
没有对应的 from_json_string() 因为反序列化对象通常是在文档上下文中完成的(因为文档可以解析引用)。
from_json_string()
trigger
unapply_theme
删除所有主题值并恢复默认值。
update
从给定的关键字参数更新对象的属性。
以下是等效的:
from bokeh.models import Range1d r = Range1d # set properties individually: r.start = 10 r.end = 20 # update properties together: r.update(start=10, end=20)
update_from_json
对象的属性从字典中更新。
json_attributes -- (JSON dict):要更新的属性和值
document
这个 Document 此模型附加到(可以是 None )
Document
struct
此模型的Bokeh协议“结构”,即以下形式的dict:
{ 'type' : << view model name >> 'id' : << unique model id >> }
此外,可能还有 subtype 字段(如果此模型是子类型)。
{ "align": "start", "aspect_ratio": null, "background": null, "case_sensitive": true, "completions": [], "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "9129", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_characters": 2, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "placeholder": "", "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "value": "", "value_input": "", "visible": true, "width": null, "width_policy": "auto" }
ColorPicker
基类:bokeh.models.widgets.inputs.InputWidget
bokeh.models.widgets.inputs.InputWidget
颜色选择器小部件
警告
此小部件作为对 Internet资源管理器 (它将显示为一个简单的文本输入)。
color
属性类型: ColorHex
ColorHex
拾取颜色的初始颜色(命名或十六进制)
{ "align": "start", "aspect_ratio": null, "background": null, "color": "#000000", "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "9160", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "visible": true, "width": null, "width_policy": "auto" }
DatePicker
基于日历的日期选择器小部件。
disabled_dates
属性类型: List ( Either ( Date , Tuple ( Date , Date ) ) )
Date
日期列表 (start, end) 不可选择的日期范围。其他日期都可以。
(start, end)
只有一个 disabled_dates 和 enabled_dates 应指定。
enabled_dates
日期列表 (start, end) 可供选择的日期范围。其他日期将不可用。
inline
日历是否以内联方式显示。
max_date
属性类型: Date
可选的最晚允许日期。
min_date
可选的最早允许日期。
position
属性类型: Enum ( CalendarPosition )
CalendarPosition
当日历相对于输入呈现时 inline 是假的。
初始日期或选定日期。
{ "align": "start", "aspect_ratio": null, "background": null, "css_classes": [], "default_size": 300, "disabled": false, "disabled_dates": [], "enabled_dates": [], "height": null, "height_policy": "auto", "id": "9186", "inline": false, "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_date": null, "max_height": null, "max_width": null, "min_date": null, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "position": "auto", "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "value": null, "visible": true, "width": null, "width_policy": "auto" }
FileInput
基类:bokeh.models.widgets.widget.Widget
bokeh.models.widgets.widget.Widget
向用户显示文件选择器对话框,并返回选定文件的内容。
accept
逗号分隔的标准HTML文件输入筛选器列表,限制用户可以从中选择的文件。值可以是:
可以选择特定的文件扩展名(例如:.gif、.jpg、.png、.doc)
所有声音文件都是可选择的
所有视频文件都是可选择的
所有图像文件都是可选择的
有效的 IANA Media Type ,没有参数。
filename
属性类型: Either ( String , List ( String ) )
加载的一个或多个文件的名称。
如果 mulitiple 如果设置为False(默认值),则此值是一个字符串,其中包含所选单个文件的名称。
如果 multiple 如果为True,则此值是一个字符串列表,每个字符串包含所选多个文件之一的名称。
此列表以值和mime类型提供相应列表的文件序列
不包括完整的文件路径,因为出于安全原因,浏览器不会提供对该信息的访问。
mime_type
加载的一个或多个文件的mime类型。
如果 mulitiple 如果设置为False(默认值),则此值为单个字符串,其中包含所选单个文件的mime类型。
如果 multiple 如果为True,则此值是一个字符串列表,每个字符串包含所选多个文件之一的mime类型。
文件序列由文件名列表给出(见下文)
multiple
对于单个文件选择,设置multiple=False(默认),如果一次可以选择多个文件,则设置multiple=True。
base64是加载的一个或多个文件的意外内容。
如果 mulitiple 如果设置为False(默认值),则此值是包含所选单个文件内容的单个字符串。
如果 multiple 如果为True,则此值是一个字符串列表,每个字符串包含所选多个文件之一的内容。
{ "accept": "", "align": "start", "aspect_ratio": null, "background": null, "css_classes": [], "default_size": 300, "disabled": false, "filename": "", "height": null, "height_policy": "auto", "id": "9218", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "mime_type": "", "min_height": null, "min_width": null, "multiple": false, "name": null, "orientation": "horizontal", "sizing_mode": null, "subscribed_events": [], "tags": [], "value": "", "visible": true, "width": null, "width_policy": "auto" }
InputWidget
输入小部件的抽象基类。
这是一个抽象基类,用于帮助组织Bokeh模型类型的层次结构。 单独实例化是没有用的。
{ "align": "start", "aspect_ratio": null, "background": null, "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "9247", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "visible": true, "width": null, "width_policy": "auto" }
MultiChoice
多音域小部件。
delete_button
是否添加按钮以删除选定的选项。
max_items
可选择的最大项目数。
option_limit
将在下拉列表中呈现的选项数。
options
属性类型: List ( Either ( String , Tuple ( String , String ) ) )
可用的选择选项。选项可以作为可能的字符串值列表或元组列表提供,每种形式 (value, label) . 在后一种情况下,每个值的可见小部件文本将对应于给定的标签。
(value, label)
如果未添加项,则显示的字符串。
solid
指定选项是否应完全填充。
初始值或选定值。
{ "align": "start", "aspect_ratio": null, "background": null, "css_classes": [], "default_size": 300, "delete_button": true, "disabled": false, "height": null, "height_policy": "auto", "id": "9272", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_items": null, "max_width": null, "min_height": null, "min_width": null, "name": null, "option_limit": null, "options": [], "orientation": "horizontal", "placeholder": null, "sizing_mode": null, "solid": true, "subscribed_events": [], "tags": [], "title": "", "value": [], "visible": true, "width": null, "width_policy": "auto" }
MultiSelect
多选控件。
size
下拉列表中可见选项的数目。(这使用 select HTML元素的 size 属性。某些浏览器可能不会显示少于3个选项。)
{ "align": "start", "aspect_ratio": null, "background": null, "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "9304", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "name": null, "options": [], "orientation": "horizontal", "size": 4, "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "value": [], "visible": true, "width": null, "width_policy": "auto" }
NumericInput
数字输入控件。
format
属性类型: Either ( String , Instance ( TickFormatter ) )
TickFormatter
high
属性类型: Either ( Float , Int )
可选的最高允许值。
low
可选的最低允许值。
mode
属性类型: Enum (枚举(int,float))
定义可在输入中输入的数字类型
示例mode int:1,-1,156模式浮点:1,-1.2,1.1e-25
初始值或输入值。
{ "align": "start", "aspect_ratio": null, "background": null, "css_classes": [], "default_size": 300, "disabled": false, "format": null, "height": null, "height_policy": "auto", "high": null, "id": "9332", "js_event_callbacks": {}, "js_property_callbacks": {}, "low": null, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "mode": "int", "name": null, "orientation": "horizontal", "placeholder": "", "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "value": null, "visible": true, "width": null, "width_policy": "auto" }
PasswordInput
单行密码输入小部件。
此小部件隐藏输入值,以便在浏览器中不可见。
将密码安全传输到Bokeh服务器应用程序代码需要配置服务器以终止SSL(即HTTPS)。
{ "align": "start", "aspect_ratio": null, "background": null, "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "9363", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "placeholder": "", "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "value": "", "value_input": "", "visible": true, "width": null, "width_policy": "auto" }
Select
单选控件。
属性类型: Either ( List ( Either ( String , Tuple ( String , String ) ) ), Dict ( String , List ( Either ( String , Tuple ( String , String ) ) ) ) )
可用的选择选项。选项可以作为可能的字符串值列表或元组列表提供,每种形式 (value, label) . 在后一种情况下,每个值的可见小部件文本将对应于给定的标签。选项分组可以通过提供dictionary对象来提供,dictionary对象的值采用上述列表格式
{ "align": "start", "aspect_ratio": null, "background": null, "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "9391", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "name": null, "options": [], "orientation": "horizontal", "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "value": "", "visible": true, "width": null, "width_policy": "auto" }
Spinner
基类:bokeh.models.widgets.inputs.NumericInput
bokeh.models.widgets.inputs.NumericInput
数字微调器输入控件。
page_step_multiplier
属性类型: Interval
Interval
定义当按下向上翻页和向下翻页键时应用于步骤的乘法因子
step
加上或减去当前值的步骤
value_throttled
交互结束时报告的值
wheel_wait
属性类型: Either ( Int , Float )
定义更新前的解闪烁时间(毫秒) value_throttled 当鼠标滚轮用于更改输入时
{ "align": "start", "aspect_ratio": null, "background": null, "css_classes": [], "default_size": 300, "disabled": false, "format": null, "height": null, "height_policy": "auto", "high": null, "id": "9418", "js_event_callbacks": {}, "js_property_callbacks": {}, "low": null, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "mode": "float", "name": null, "orientation": "horizontal", "page_step_multiplier": 10, "placeholder": "", "sizing_mode": null, "step": 1, "subscribed_events": [], "tags": [], "title": "", "value": null, "value_throttled": null, "visible": true, "wheel_wait": 100, "width": null, "width_policy": "auto" }
TextAreaInput
多行输入控件。
cols
指定文本区域的宽度(平均字符宽度)。默认值:20
max_length
字段中的最大字符数
rows
指定文本区域的高度(以行为单位)。默认值:2
{ "align": "start", "aspect_ratio": null, "background": null, "cols": 20, "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "9453", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_length": 500, "max_width": null, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "placeholder": "", "rows": 2, "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "value": "", "value_input": "", "visible": true, "width": null, "width_policy": "auto" }
TextInput
单行输入控件。
{ "align": "start", "aspect_ratio": null, "background": null, "css_classes": [], "default_size": 300, "disabled": false, "height": null, "height_policy": "auto", "id": "9484", "js_event_callbacks": {}, "js_property_callbacks": {}, "margin": [ 5, 5, 5, 5 ], "max_height": null, "max_width": null, "min_height": null, "min_width": null, "name": null, "orientation": "horizontal", "placeholder": "", "sizing_mode": null, "subscribed_events": [], "tags": [], "title": "", "value": "", "value_input": "", "visible": true, "width": null, "width_policy": "auto" }