{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", " \n", " \n", " \n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Select\n", "\n", "\n", "Selects [component](00_components.ipynb) creation in Epyk will be using the function **select** from the ui property.\n", "\n", "the ui entry point will give you access to all the registered components.\n", "Different flavour of buttons are available in the framework.\n", "\n", "## Basic select" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "" ], "text/plain": [ "" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from epyk.core.Page import Report\n", "\n", "rptObj = Report()\n", "select = rptObj.ui.select([\"Test\", \"Test2\"])\n", "select.options.container = 'body'\n", "\n", "rptObj.outs.jupyter()" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "" ], "text/plain": [ "" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from epyk.core.Page import Report\n", "\n", "lookupData = {\"Akron-Canton Regional\": [\n", " {\"value\": \"A\", 'text': \"Example 1\"},\n", " {\"value\": \"B\", 'text': \"Example 2\"}\n", "]}\n", "select2 = rptObj.ui.lookup(lookupData)\n", "select2.options.container = 'body'\n", "\n", "rptObj.outs.jupyter()" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "" ], "text/plain": [ "" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from epyk.core.Page import Report\n", "\n", "multi = rptObj.ui.select([\"Test\", \"Test2\"], multiple=True)\n", "multi.options.actionsBox = False\n", "multi.options.header = \"Test Select\"\n", "multi.options.selectOnTab = True\n", "multi.options.showTick = True\n", "multi.options.container = 'body'\n", "\n", "rptObj.outs.jupyter()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Go back to the tutorials page\n", "
\n", "Do not forget that this is a collaborative framework so do not hesitate to give feedbacks and like the different repository to get more visbility.\n", "\n", "Also any help is more than welcome !" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.2" } }, "nbformat": 4, "nbformat_minor": 4 }