Skip to content

Commit de5a548

Browse files
committed
Delete the docs for the on_submit method.
1 parent 7d53455 commit de5a548

File tree

1 file changed

+8
-44
lines changed

1 file changed

+8
-44
lines changed

docs/source/examples/Widget Events.ipynb

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -124,63 +124,27 @@
124124
}
125125
},
126126
"source": [
127-
"### on_submit"
128-
]
129-
},
130-
{
131-
"cell_type": "markdown",
132-
"metadata": {},
133-
"source": [
134-
"The `Text` widget also has a special `on_submit` event. The `on_submit` event fires when the user hits return."
135-
]
136-
},
137-
{
138-
"cell_type": "code",
139-
"execution_count": 4,
140-
"metadata": {},
141-
"outputs": [
142-
{
143-
"data": {
144-
"application/vnd.jupyter.widget-view+json": {
145-
"model_id": "cab0a6538a00491f95c48e77707e9ad8"
146-
}
147-
},
148-
"metadata": {},
149-
"output_type": "display_data"
150-
}
151-
],
152-
"source": [
153-
"text = widgets.Text()\n",
154-
"display(text)\n",
155-
"\n",
156-
"def handle_submit(sender):\n",
157-
" print(text.value)\n",
158-
"\n",
159-
"text.on_submit(handle_submit)"
127+
"## Traitlet events"
160128
]
161129
},
162130
{
163131
"cell_type": "markdown",
164132
"metadata": {
165-
"slideshow": {
166-
"slide_type": "slide"
167-
}
133+
"deletable": true,
134+
"editable": true
168135
},
169-
"source": [
170-
"## Traitlet events"
171-
]
172-
},
173-
{
174-
"cell_type": "markdown",
175-
"metadata": {},
176136
"source": [
177137
"Widget properties are IPython traitlets and traitlets are eventful. To handle changes, the `observe` method of the widget can be used to register a callback. The doc string for `observe` can be seen below."
178138
]
179139
},
180140
{
181141
"cell_type": "code",
182142
"execution_count": 5,
183-
"metadata": {},
143+
"metadata": {
144+
"collapsed": false,
145+
"deletable": true,
146+
"editable": true
147+
},
184148
"outputs": [
185149
{
186150
"name": "stdout",

0 commit comments

Comments
 (0)