Skip to content

Pages not dynamic enough (?) #1258

Answered by FlorianJacta
s4n-cz asked this question in Q&A
Discussion options

You must be logged in to vote

Would partials help you? It is a way to change a part of your page in real-time.

Here is an unrelated code to explain how partials can be used:

from taipy.gui import Gui 
import taipy.gui.builder as tgb 

value = 15
min_slider = 10    
max_slider = 200

def create_slider_partial(min_slider=10, max_slider=200):
    with tgb.Page() as new_slider:
        tgb.slider("{value}", min=min_slider, max=max_slider)
    return new_slider

def change_partial(state):
    state.slider_partial.update_content(state, create_slider_partial(state.min_slider, state.max_slider))

with tgb.Page() as main_page:
    tgb.text("Change the minimum:")
    tgb.number("{min_slider}", on_change=change_partial)

    tgb.t…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@s4n-cz
Comment options

Answer selected by s4n-cz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants