Comments (4)
Duplicate of #526?
from taipy.
Duplicate of #526?
Yes it is
from taipy.
Here is a list of functioning tgb code as reference:
from taipy import Gui
import taipy.gui.builder as tgb
# slider_value needs to be initialized first
slider_value = 5
with tgb.Page() as page:
tgb.slider('{slider_value}', min=0, max=10)
tgb.text('slider_value: {slider_value}')
if __name__ == '__main__':
Gui(page).run(use_reloader=True)
from taipy import Gui
import taipy.gui.builder as tgb
with tgb.Page() as page:
tgb.status('Any text will be displayed this way')
tgb.status('')
# some keywords will change the color of your status
tgb.status('warning')
tgb.status('success')
tgb.status('secondary')
if __name__ == '__main__':
Gui(page).run(use_reloader=True)
from taipy import Gui
import taipy.gui.builder as tgb
choice = 'No'
def toggle_func(state, var_name, value):
print(f'state.choice: {state.choice}')
print(f'var_name: {var_name}')
print(f'value: {value}')
with tgb.Page() as page:
tgb.text('Current choice: {choice}')
tgb.toggle(value='{choice}', lov=['Yes', 'No'], on_change=toggle_func)
if __name__ == '__main__':
Gui(page).run(use_reloader=True)
from taipy import Gui
import taipy.gui.builder as tgb
# the variable used to open/close the dialog
dialog_status = False
def open_dialog(state):
state.dialog_status = not state.dialog_status
with tgb.Page() as dialog_content:
tgb.html('p', 'Inside the dialog')
with tgb.Page() as page:
tgb.button("Open dialog", on_action=open_dialog)
tgb.dialog('{dialog_status}', on_action=open_dialog, partial='{dialog_partial}')
if __name__ == "__main__":
gui = Gui(page=page)
dialog_partial = gui.add_partial(dialog_content)
gui.run(use_reloader=True)
from taipy import Gui
import taipy.gui.builder as tgb
# The variable used to open/close the expandable
expand_status = False
with tgb.Page() as partial_content:
tgb.html('p', 'Inside the expandable')
def change_status(state):
print(state.expand_status)
state.expand_status = not state.expand_status
with tgb.Page() as page:
# You can click both the button or the expandable to open it
tgb.button('Open Expandable', on_action=change_status)
tgb.expandable(title='Expandable title', partial='{expandable_content}', expanded='{expand_status}', on_action=change_status)
if __name__ == '__main__':
gui = Gui(page)
expandable_content = gui.add_partial(partial_content)
gui.run(use_reloader=True)
from taipy import Gui
import taipy.gui.builder as tgb
# input_value needs to be initialized first
input_value = '...'
with tgb.Page() as page:
tgb.input('{input_value}')
tgb.text('input_value: {input_value}')
if __name__ == '__main__':
Gui(page).run(use_reloader=True)
from taipy import Gui
import taipy.gui.builder as tgb
choice = 'B' # the variable displayed by the selector
with tgb.Page() as page:
tgb.selector(value='{choice}', lov=['A', 'B', 'C'], dropdown=True)
tgb.html('p', 'Not displayed alone:')
tgb.text('{choice}')
tgb.html('p', 'Displayed when added some text:')
tgb.text('You selected: {choice}')
if __name__ == '__main__':
Gui(page).run(use_reloader=True)
from taipy import Gui
import taipy.gui.builder as tgb
status = {"status": "error", "message": "This is an error message"}
with tgb.Page() as page:
tgb.status("{status}")
if __name__ == "__main__":
Gui(page).run(use_reloader=True)
from taipy.
Closing this issue because it is a duplicate of #526
from taipy.
Related Issues (20)
- Homepage links should link to the first tutorials and not to the user manual
- Dead link on doc homepage
- Issue using a taipy gui builder element to update partials HOT 3
- Error when displaying 'b' in a text HOT 1
- Improvement on date visual elements to not break the line HOT 11
- Input visual element has a frustrating delay
- Expose Submission and submission ids to the relevant taipy core APIs
- Creating pages through methods fails HOT 7
- Support indexed properties in Page Builder
- Add the possibility in treemap to set a color according to a specific value and a size depending on a weight set on the sector HOT 6
- Documentation Error for LTTB decimator HOT 3
- Python 3.12 Support HOT 3
- Consider a simpler syntax for tgb property values HOT 2
- Remove modin exposed type from tableDatanode
- Make a slider in float type with a particular step value HOT 1
- Is it possible to show plotly.graph_objscts Figure? HOT 1
- Update copyright notices to 2024
- BUG- Talk to Taipy is not working HOT 1
- Other integration for Plotly Python in Taipy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taipy.