diff --git a/examples/Interactive Widgets/Widget Basics.ipynb b/examples/Interactive Widgets/Widget Basics.ipynb index 3b12ed013..d39b3758a 100644 --- a/examples/Interactive Widgets/Widget Basics.ipynb +++ b/examples/Interactive Widgets/Widget Basics.ipynb @@ -7,7 +7,7 @@ ] ], "name": "", - "signature": "sha256:9a70b52f0b16861d1cd6a8342b233247958977a52bde8d3efd69d21131ce1926" + "signature": "sha256:5ac3a85c8bb2f9bb3cd63b524bbb626ab1531176b43a109d13f5d7794f805eee" }, "nbformat": 3, "nbformat_minor": 0, @@ -31,7 +31,7 @@ "language": "python", "metadata": {}, "outputs": [], - "prompt_number": 1 + "prompt_number": 2 }, { "cell_type": "heading", @@ -298,6 +298,39 @@ } ], "prompt_number": 10 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Some widgets have special attributes. For example, text boxes and text areas can specify the `placeholder` attribute, which will set \"placeholder\" text to be displayed before the user has typed anything:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "mytextwidget = widgets.TextWidget()\n", + "mytextwidget.placeholder = \"type something here\"\n", + "display(mytextwidget)" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "mytextareawidget = widgets.TextareaWidget()\n", + "mytextareawidget.placeholder = \"your text here\"\n", + "display(mytextareawidget)" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 5 } ], "metadata": {}