|
90 | 90 | "b3" |
91 | 91 | ] |
92 | 92 | }, |
| 93 | + { |
| 94 | + "cell_type": "code", |
| 95 | + "execution_count": null, |
| 96 | + "metadata": {}, |
| 97 | + "outputs": [], |
| 98 | + "source": [ |
| 99 | + "b2.style.button_color = 'red'" |
| 100 | + ] |
| 101 | + }, |
93 | 102 | { |
94 | 103 | "cell_type": "markdown", |
95 | 104 | "metadata": {}, |
|
201 | 210 | "<details>\n", |
202 | 211 | "<summary><strong>Box model</strong></summary>\n", |
203 | 212 | "\n", |
204 | | - "- `border` \n", |
| 213 | + "- `border` -- changing in `ipywidgets 8`; will have four new properties `border_left`, `border_right`, `border_top` and `border_bottom`, to better match what CSS provides. `border` will still be available as a shortcut, but will not set a `border` CSS property.\n", |
205 | 214 | "- `margin`\n", |
206 | 215 | "- `padding`\n", |
207 | 216 | "\n", |
|
336 | 345 | "metadata": {}, |
337 | 346 | "outputs": [], |
338 | 347 | "source": [ |
339 | | - "b1.layout. # fill this in, might take more than one line" |
| 348 | + "b1.layout. # fill this in, might take more than one line\n" |
340 | 349 | ] |
341 | 350 | }, |
342 | 351 | { |
|
674 | 683 | " layout=Layout(width='auto', height='auto'))\n", |
675 | 684 | "min_slider = FloatSlider(min=-1, max=10, description=\"Min: \",\n", |
676 | 685 | " layout=Layout(width='auto', height='auto'))\n", |
677 | | - "app = TwoByTwoLayout(top_left=min_slider,\n", |
| 686 | + "\n", |
| 687 | + "# Set up two sliders and a graph. The \"max\" slider sets the upper limit for the \"min\" \n", |
| 688 | + "# slider, and the value of the \"min\" slider sets the upper limit for the \"max\" slider.\n", |
| 689 | + "bqfig = TwoByTwoLayout(top_left=min_slider,\n", |
678 | 690 | " bottom_left=max_slider, \n", |
679 | 691 | " bottom_right=fig,\n", |
680 | 692 | " align_items=\"center\", \n", |
|
686 | 698 | "jslink((max_slider, 'min'), (min_slider, 'value'))\n", |
687 | 699 | "\n", |
688 | 700 | "max_slider.value = 1.5\n", |
689 | | - "app" |
| 701 | + "bqfig" |
690 | 702 | ] |
691 | 703 | }, |
692 | 704 | { |
|
786 | 798 | "metadata": {}, |
787 | 799 | "outputs": [], |
788 | 800 | "source": [ |
789 | | - "# %load solutions/applayout-no-sides.py" |
| 801 | + "# %load solutions/applayout-no-sides.py\n" |
790 | 802 | ] |
791 | 803 | }, |
792 | 804 | { |
|
876 | 888 | "metadata": {}, |
877 | 889 | "outputs": [], |
878 | 890 | "source": [ |
879 | | - "# %load solutions/slider-bqplot-sliders-app.py" |
| 891 | + "# %load solutions/slider-bqplot-sliders-app.py\n" |
880 | 892 | ] |
881 | 893 | }, |
882 | 894 | { |
|
1087 | 1099 | "outputs": [], |
1088 | 1100 | "source": [ |
1089 | 1101 | "GridBox(children=[Button(description=str(i), layout=Layout(width='auto', height='auto'),\n", |
1090 | | - " style=ButtonStyle(button_color='darkseagreen')) for i in range(12)\n", |
| 1102 | + " style=ButtonStyle(button_color='darkseagreen')) for i in range(7)\n", |
1091 | 1103 | " ],\n", |
1092 | 1104 | " layout=Layout(\n", |
1093 | 1105 | " width='50%',\n", |
|
1211 | 1223 | "name": "python", |
1212 | 1224 | "nbconvert_exporter": "python", |
1213 | 1225 | "pygments_lexer": "ipython3", |
1214 | | - "version": "3.8.10" |
| 1226 | + "version": "3.9.13" |
1215 | 1227 | } |
1216 | 1228 | }, |
1217 | 1229 | "nbformat": 4, |
|
0 commit comments